Public Member Functions | |
__construct () | |
render (Varien_Data_Form_Element_Abstract $element) | |
setElement (Varien_Data_Form_Element_Abstract $element) | |
getElement () | |
getValues () | |
getAddButtonHtml () | |
getDeleteButtonHtml ($image) | |
Protected Member Functions | |
_prepareLayout () | |
Protected Attributes | |
$_element = null |
Definition at line 34 of file Gallery.php.
__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 39 of file Gallery.php.
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 66 of file Gallery.php.
00067 { 00068 $this->setChild('delete_button', 00069 $this->getLayout()->createBlock('adminhtml/widget_button') 00070 ->setData(array( 00071 'label' => Mage::helper('adminhtml')->__('Delete'), 00072 'onclick' => "deleteImage(#image#)", 00073 'class' => 'delete' 00074 ))); 00075 00076 $this->setChild('add_button', 00077 $this->getLayout()->createBlock('adminhtml/widget_button') 00078 ->setData(array( 00079 'label' => Mage::helper('adminhtml')->__('Add New Image'), 00080 'onclick' => 'addNewImage()', 00081 'class' => 'add' 00082 ))); 00083 return parent::_prepareLayout(); 00084 }
getAddButtonHtml | ( | ) |
Definition at line 86 of file Gallery.php.
00087 { 00088 return $this->getChildHtml('add_button'); 00089 }
getDeleteButtonHtml | ( | $ | image | ) |
Definition at line 91 of file Gallery.php.
00092 { 00093 return str_replace('#image#', $image, $this->getChildHtml('delete_button')); 00094 }
getElement | ( | ) |
getValues | ( | ) |
Definition at line 61 of file Gallery.php.
00062 { 00063 return $this->getElement()->getValue(); 00064 }
render | ( | Varien_Data_Form_Element_Abstract $ | element | ) |
Implements Varien_Data_Form_Element_Renderer_Interface.
Definition at line 44 of file Gallery.php.
00045 { 00046 $this->setElement($element); 00047 return $this->toHtml(); 00048 }
setElement | ( | Varien_Data_Form_Element_Abstract $ | element | ) |
$_element = null [protected] |
Definition at line 37 of file Gallery.php.