Public Member Functions | |
__construct () | |
getHeaderText () | |
getProductsJson () |
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_quote'; 00043 00044 parent::__construct(); 00045 00046 $this->_updateButton('save', 'label', Mage::helper('salesrule')->__('Save Rule')); 00047 $this->_updateButton('delete', 'label', Mage::helper('salesrule')->__('Delete Rule')); 00048 00049 $rule = Mage::registry('current_promo_quote_rule'); 00050 00051 if (!$rule->isDeleteable()) { 00052 $this->_removeButton('delete'); 00053 } 00054 00055 if ($rule->isReadonly()) { 00056 $this->_removeButton('save'); 00057 $this->_removeButton('reset'); 00058 } 00059 00060 #$this->setTemplate('promo/quote/edit.phtml'); 00061 }
getHeaderText | ( | ) |
Get header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 63 of file Edit.php.
00064 { 00065 $rule = Mage::registry('current_promo_quote_rule'); 00066 if ($rule->getRuleId()) { 00067 return Mage::helper('salesrule')->__("Edit Rule '%s'", $this->htmlEscape($rule->getName())); 00068 } 00069 else { 00070 return Mage::helper('salesrule')->__('New Rule'); 00071 } 00072 }