Mage_Adminhtml_Block_Widget_Button Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Widget_Button:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes_Create

List of all members.

Public Member Functions

 __construct ()
 getType ()
 getOnClick ()

Protected Member Functions

 _toHtml ()


Detailed Description

Definition at line 34 of file Button.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 36 of file Button.php.

00037     {
00038         parent::__construct();
00039     }


Member Function Documentation

_toHtml (  )  [protected]

Render block HTML

Returns:
string

Reimplemented from Mage_Core_Block_Template.

Reimplemented in Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes_Create.

Definition at line 54 of file Button.php.

00055     {
00056         $html = $this->getBeforeHtml().'<button '
00057             . ($this->getId()?' id="'.$this->getId() . '"':'')
00058             . ($this->getName()?' name="'.$this->getName() . '"':'')
00059             . ' type="'.$this->getType() . '"'
00060             . ' class="scalable '.$this->getClass().'"'
00061             . ' onclick="'.$this->getOnClick().'"'
00062             . ' style="'.$this->getStyle() .'"'
00063             . ($this->getValue()?' value="'.$this->getValue() . '"':'')
00064             . ($this->getDisabled() ? 'disabled="disabled"' : '')
00065             . '><span>' .$this->getLabel().'</span></button>'.$this->getAfterHtml();
00066 
00067         return $html;
00068     }

getOnClick (  ) 

Definition at line 46 of file Button.php.

00047     {
00048         if (!$this->getData('on_click')) {
00049             return $this->getData('onclick');
00050         }
00051         return $this->getData('on_click');
00052     }

getType (  ) 

Definition at line 41 of file Button.php.

00042     {
00043         return ($type=$this->getData('type')) ? $type : 'button';
00044     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:06 2009 for Magento by  doxygen 1.5.8