Public Member Functions | |
__construct () | |
getHeaderText () |
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 = 'block_id'; 00041 $this->_controller = 'cms_block'; 00042 00043 parent::__construct(); 00044 00045 $this->_updateButton('save', 'label', Mage::helper('cms')->__('Save Block')); 00046 $this->_updateButton('delete', 'label', Mage::helper('cms')->__('Delete Block')); 00047 00048 $this->_addButton('saveandcontinue', array( 00049 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'), 00050 'onclick' => 'saveAndContinueEdit()', 00051 'class' => 'save', 00052 ), -100); 00053 00054 $this->_formScripts[] = " 00055 function toggleEditor() { 00056 if (tinyMCE.getInstanceById('block_content') == null) { 00057 tinyMCE.execCommand('mceAddControl', false, 'block_content'); 00058 } else { 00059 tinyMCE.execCommand('mceRemoveControl', false, 'block_content'); 00060 } 00061 } 00062 00063 function saveAndContinueEdit(){ 00064 editForm.submit($('edit_form').action+'back/edit/'); 00065 } 00066 "; 00067 }
getHeaderText | ( | ) |
Get edit form container header text
Reimplemented from Mage_Adminhtml_Block_Widget_Container.
Definition at line 74 of file Edit.php.
00075 { 00076 if (Mage::registry('cms_block')->getId()) { 00077 return Mage::helper('cms')->__("Edit Block '%s'", $this->htmlEscape(Mage::registry('cms_block')->getTitle())); 00078 } 00079 else { 00080 return Mage::helper('cms')->__('New Block'); 00081 } 00082 }