Mage_Adminhtml_Block_System_Store_Edit Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Store_Edit:

Mage_Adminhtml_Block_Widget_Form_Container Mage_Adminhtml_Block_Widget_Container Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getHeaderText ()


Detailed Description

Definition at line 35 of file Edit.php.


Constructor & Destructor Documentation

__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     }


Member Function Documentation

getHeaderText (  ) 

Get Header text

Returns:
string

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:04 2009 for Magento by  doxygen 1.5.8