Public Member Functions | |
__construct () | |
getHeaderText () | |
getValidationUrl () | |
getSaveUrl () |
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 = 'attribute_id'; 00041 $this->_controller = 'catalog_product_attribute'; 00042 00043 parent::__construct(); 00044 00045 if($this->getRequest()->getParam('popup')) { 00046 $this->_removeButton('back'); 00047 $this->_addButton( 00048 'close', 00049 array( 00050 'label' => Mage::helper('catalog')->__('Close Window'), 00051 'class' => 'cancel', 00052 'onclick' => 'window.close()', 00053 'level' => -1 00054 ) 00055 ); 00056 } 00057 00058 $this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save Attribute')); 00059 $this->_addButton( 00060 'save_and_edit_button', 00061 array( 00062 'label' => Mage::helper('catalog')->__('Save And Continue Edit'), 00063 'onclick' => 'saveAndContinueEdit()', 00064 'class' => 'save' 00065 ), 00066 100 00067 ); 00068 00069 if (! Mage::registry('entity_attribute')->getIsUserDefined()) { 00070 $this->_removeButton('delete'); 00071 } else { 00072 $this->_updateButton('delete', 'label', Mage::helper('catalog')->__('Delete Attribute')); 00073 } 00074 }
getHeaderText | ( | ) |
Get header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 76 of file Edit.php.
00077 { 00078 if (Mage::registry('entity_attribute')->getId()) { 00079 $frontendLabel = Mage::registry('entity_attribute')->getFrontendLabel(); 00080 if (is_array($frontendLabel)) { 00081 $frontendLabel = $frontendLabel[0]; 00082 } 00083 return Mage::helper('catalog')->__('Edit Product Attribute "%s"', $this->htmlEscape($frontendLabel)); 00084 } 00085 else { 00086 return Mage::helper('catalog')->__('New Product Attribute'); 00087 } 00088 }
getSaveUrl | ( | ) |
Get form save URL
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 95 of file Edit.php.
00096 { 00097 return $this->getUrl('*/'.$this->_controller.'/save', array('_current'=>true, 'back'=>null)); 00098 }
getValidationUrl | ( | ) |