Public Member Functions | |
__construct () | |
getHeaderText () |
Definition at line 35 of file Edit.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 Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 38 of file Edit.php.
00039 { 00040 $this->_objectId = 'tag_id'; 00041 $this->_controller = 'tag'; 00042 00043 parent::__construct(); 00044 00045 if( $this->getRequest()->getParam('product_id') ) { 00046 $this->_updateButton('back', 'onclick', "setLocation('" . $this->getUrl('*/catalog_product/edit', array('id' => $this->getRequest()->getParam('product_id'))) . "')"); 00047 } 00048 00049 if( $this->getRequest()->getParam('customer_id') ) { 00050 $this->_updateButton('back', 'onclick', "setLocation('" . $this->getUrl('*/customer/edit', array('id' => $this->getRequest()->getParam('customer_id'))) . "')"); 00051 } 00052 00053 if( $this->getRequest()->getParam('ret', false) == 'pending' ) { 00054 $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/pending') .'\')' ); 00055 $this->_updateButton('delete', 'onclick', 'deleteConfirm(\'' . Mage::helper('tag')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array( 00056 $this->_objectId => $this->getRequest()->getParam($this->_objectId), 00057 'ret' => 'pending', 00058 )) .'\')' ); 00059 Mage::register('ret', 'pending'); 00060 } 00061 00062 $this->_updateButton('save', 'label', Mage::helper('tag')->__('Save Tag')); 00063 $this->_updateButton('delete', 'label', Mage::helper('tag')->__('Delete Tag')); 00064 }
getHeaderText | ( | ) |
Get header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 66 of file Edit.php.
00067 { 00068 if (Mage::registry('tag_tag')->getId()) { 00069 return Mage::helper('tag')->__("Edit Tag '%s'", $this->htmlEscape(Mage::registry('tag_tag')->getName())); 00070 } 00071 else { 00072 return Mage::helper('tag')->__('New Tag'); 00073 } 00074 }