*/ class Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Addrow extends Varien_Data_Form_Element_Button { /** * Render Element Html * * @return string */ public function getElementHtml() { $html = $this->getBeforeElementHtml() . '' . $this->getAfterElementHtml(); return $html; } /** * Getter for "before_element_html" * * @return string */ public function getBeforeElementHtml() { return $this->getData('before_element_html'); } /** * Return label html code * * @param string $idSuffix * @return string */ public function getLabelHtml($idSuffix = '') { if ($this->getLabel() !== null) { $html = ''; } else { $html = ''; } return $html; } /** * Overriding toHtml parent method * Adding addrow Block to element renderer * * @return string */ public function toHtml() { $blockClassName = Mage::getConfig()->getBlockClassName('adminhtml/template'); $jsBlock = new $blockClassName; $jsBlock->setTemplate('xmlconnect/form/element/addrow.phtml'); $jsBlock->setOptions($this->getOptions()); return parent::toHtml() . $jsBlock->toHtml(); } }