Public Member Functions | |
__construct () | |
getHeaderText () |
Definition at line 36 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 39 of file Edit.php.
00040 { 00041 $this->_objectId = 'id'; 00042 $this->_controller = 'promo_catalog'; 00043 00044 parent::__construct(); 00045 00046 $this->_updateButton('save', 'label', Mage::helper('catalogrule')->__('Save Rule')); 00047 $this->_updateButton('delete', 'label', Mage::helper('catalogrule')->__('Delete Rule')); 00048 00049 $rule = Mage::registry('current_promo_catalog_rule'); 00050 00051 if (!$rule->isDeleteable()) { 00052 $this->_removeButton('delete'); 00053 } 00054 00055 if (!$rule->isReadonly()) { 00056 $this->_addButton('save_apply', array( 00057 'class'=>'save', 00058 'label'=>Mage::helper('catalogrule')->__('Save and Apply'), 00059 'onclick'=>"$('rule_auto_apply').value=1; editForm.submit()", 00060 )); 00061 } else { 00062 $this->_removeButton('reset'); 00063 $this->_removeButton('save'); 00064 } 00065 }
getHeaderText | ( | ) |
Get header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 67 of file Edit.php.
00068 { 00069 $rule = Mage::registry('current_promo_catalog_rule'); 00070 if ($rule->getRuleId()) { 00071 return Mage::helper('catalogrule')->__("Edit Rule '%s'", $this->htmlEscape($rule->getName())); 00072 } 00073 else { 00074 return Mage::helper('catalogrule')->__('New Rule'); 00075 } 00076 }