Mage_Adminhtml_Block_System_Design_Edit Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Design_Edit:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getDesignChangeId ()
 getDeleteUrl ()
 getSaveUrl ()
 getValidationUrl ()
 getHeader ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 27 of file Edit.php.


Constructor & Destructor Documentation

__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 Varien_Object.

Definition at line 29 of file Edit.php.

00030     {
00031         parent::__construct();
00032         $this->setTemplate('system/design/edit.phtml');
00033         $this->setId('design_edit');
00034     }


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 36 of file Edit.php.

00037     {
00038         $this->setChild('back_button',
00039             $this->getLayout()->createBlock('adminhtml/widget_button')
00040                 ->setData(array(
00041                     'label'     => Mage::helper('core')->__('Back'),
00042                     'onclick'   => 'setLocation(\''.$this->getUrl('*/*/').'\')',
00043                     'class' => 'back'
00044                 ))
00045         );
00046 
00047         $this->setChild('save_button',
00048             $this->getLayout()->createBlock('adminhtml/widget_button')
00049                 ->setData(array(
00050                     'label'     => Mage::helper('core')->__('Save'),
00051                     'onclick'   => 'designForm.submit()',
00052                     'class' => 'save'
00053                 ))
00054         );
00055 
00056         $this->setChild('delete_button',
00057             $this->getLayout()->createBlock('adminhtml/widget_button')
00058                 ->setData(array(
00059                     'label'     => Mage::helper('core')->__('Delete'),
00060                     'onclick'   => 'confirmSetLocation(\''.Mage::helper('core')->__('Are you sure?').'\', \''.$this->getDeleteUrl().'\')',
00061                     'class'  => 'delete'
00062                 ))
00063         );
00064         return parent::_prepareLayout();
00065     }

getDeleteUrl (  ) 

Definition at line 72 of file Edit.php.

00073     {
00074         return $this->getUrl('*/*/delete', array('_current'=>true));
00075     }

getDesignChangeId (  ) 

Definition at line 67 of file Edit.php.

00068     {
00069         return Mage::registry('design')->getId();
00070     }

getHeader (  ) 

Definition at line 87 of file Edit.php.

00088     {
00089         $header = '';
00090         if (Mage::registry('design')->getId()) {
00091             $header = Mage::helper('core')->__('Edit Design Change');
00092         } else {
00093             $header = Mage::helper('core')->__('New Design Change');
00094         }
00095         return $header;
00096     }

getSaveUrl (  ) 

Definition at line 77 of file Edit.php.

00078     {
00079         return $this->getUrl('*/*/save', array('_current'=>true));
00080     }

getValidationUrl (  ) 

Definition at line 82 of file Edit.php.

00083     {
00084         return $this->getUrl('*/*/validate', array('_current'=>true));
00085     }


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