Public Member Functions | |
__construct () | |
getHeaderText () |
Definition at line 35 of file Edit.php.
__construct | ( | ) |
Init class
Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.
Definition at line 41 of file Edit.php.
00042 { 00043 switch (Mage::registry('store_type')) { 00044 case 'website': 00045 $this->_objectId = 'website_id'; 00046 $saveLabel = Mage::helper('core')->__('Save Website'); 00047 $deleteLabel = Mage::helper('core')->__('Delete Website'); 00048 $deleteUrl = $this->getUrl('*/*/deleteWebsite', array('item_id' => Mage::registry('store_data')->getId())); 00049 break; 00050 case 'group': 00051 $this->_objectId = 'group_id'; 00052 $saveLabel = Mage::helper('core')->__('Save Store'); 00053 $deleteLabel = Mage::helper('core')->__('Delete Store'); 00054 $deleteUrl = $this->getUrl('*/*/deleteGroup', array('item_id' => Mage::registry('store_data')->getId())); 00055 break; 00056 case 'store': 00057 $this->_objectId = 'store_id'; 00058 $saveLabel = Mage::helper('core')->__('Save Store View'); 00059 $deleteLabel = Mage::helper('core')->__('Delete Store View'); 00060 $deleteUrl = $this->getUrl('*/*/deleteStore', array('item_id' => Mage::registry('store_data')->getId())); 00061 break; 00062 } 00063 $this->_controller = 'system_store'; 00064 00065 parent::__construct(); 00066 00067 $this->_updateButton('save', 'label', $saveLabel); 00068 $this->_updateButton('delete', 'label', $deleteLabel); 00069 $this->_updateButton('delete', 'onclick', 'setLocation(\''.$deleteUrl.'\');'); 00070 00071 if (!Mage::registry('store_data')->isCanDelete()) { 00072 $this->_removeButton('delete'); 00073 } 00074 if (Mage::registry('store_data')->isReadOnly()) { 00075 $this->_removeButton('save')->_removeButton('reset'); 00076 } 00077 }
getHeaderText | ( | ) |
Get Header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 84 of file Edit.php.
00085 { 00086 switch (Mage::registry('store_type')) { 00087 case 'website': 00088 $editLabel = Mage::helper('core')->__('Edit Website'); 00089 $addLabel = Mage::helper('core')->__('New Website'); 00090 break; 00091 case 'group': 00092 $editLabel = Mage::helper('core')->__('Edit Store'); 00093 $addLabel = Mage::helper('core')->__('New Store'); 00094 break; 00095 case 'store': 00096 $editLabel = Mage::helper('core')->__('Edit Store View'); 00097 $addLabel = Mage::helper('core')->__('New Store View'); 00098 break; 00099 } 00100 00101 return Mage::registry('store_action') == 'add' ? $addLabel : $editLabel; 00102 }