Mage_Adminhtml_Block_Cms_Block_Edit_Form Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Cms_Block_Edit_Form:

Mage_Adminhtml_Block_Widget_Form 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 ()

Protected Member Functions

 _prepareForm ()


Detailed Description

Definition at line 35 of file Form.php.


Constructor & Destructor Documentation

__construct (  ) 

Init form

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 41 of file Form.php.

00042     {
00043         parent::__construct();
00044         $this->setId('block_form');
00045         $this->setTitle(Mage::helper('cms')->__('Block Information'));
00046     }


Member Function Documentation

_prepareForm (  )  [protected]

Prepare form before rendering HTML

Returns:
Mage_Adminhtml_Block_Widget_Form

Check is single store mode

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 48 of file Form.php.

00049     {
00050         $model = Mage::registry('cms_block');
00051 
00052         $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
00053 
00054         $form->setHtmlIdPrefix('block_');
00055 
00056         $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('cms')->__('General Information'), 'class' => 'fieldset-wide'));
00057 
00058         if ($model->getBlockId()) {
00059             $fieldset->addField('block_id', 'hidden', array(
00060                 'name' => 'block_id',
00061             ));
00062         }
00063 
00064         $fieldset->addField('title', 'text', array(
00065             'name'      => 'title',
00066             'label'     => Mage::helper('cms')->__('Block Title'),
00067             'title'     => Mage::helper('cms')->__('Block Title'),
00068             'required'  => true,
00069         ));
00070 
00071         $fieldset->addField('identifier', 'text', array(
00072             'name'      => 'identifier',
00073             'label'     => Mage::helper('cms')->__('Identifier'),
00074             'title'     => Mage::helper('cms')->__('Identifier'),
00075             'required'  => true,
00076             'class'     => 'validate-xml-identifier',
00077         ));
00078 
00079         /**
00080          * Check is single store mode
00081          */
00082         if (!Mage::app()->isSingleStoreMode()) {
00083             $fieldset->addField('store_id', 'multiselect', array(
00084                 'name'      => 'stores[]',
00085                 'label'     => Mage::helper('cms')->__('Store View'),
00086                 'title'     => Mage::helper('cms')->__('Store View'),
00087                 'required'  => true,
00088                 'values'    => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),
00089             ));
00090         }
00091         else {
00092             $fieldset->addField('store_id', 'hidden', array(
00093                 'name'      => 'stores[]',
00094                 'value'     => Mage::app()->getStore(true)->getId()
00095             ));
00096             $model->setStoreId(Mage::app()->getStore(true)->getId());
00097         }
00098 
00099         $fieldset->addField('is_active', 'select', array(
00100             'label'     => Mage::helper('cms')->__('Status'),
00101             'title'     => Mage::helper('cms')->__('Status'),
00102             'name'      => 'is_active',
00103             'required'  => true,
00104             'options'   => array(
00105                 '1' => Mage::helper('cms')->__('Enabled'),
00106                 '0' => Mage::helper('cms')->__('Disabled'),
00107             ),
00108         ));
00109 
00110         $fieldset->addField('content', 'editor', array(
00111             'name'      => 'content',
00112             'label'     => Mage::helper('cms')->__('Content'),
00113             'title'     => Mage::helper('cms')->__('Content'),
00114             'style'     => 'height:36em',
00115             'wysiwyg'   => false,
00116             'required'  => true,
00117         ));
00118 
00119         $form->setValues($model->getData());
00120         $form->setUseContainer(true);
00121         $this->setForm($form);
00122 
00123         return parent::_prepareForm();
00124     }


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

Generated on Sat Jul 4 17:22:47 2009 for Magento by  doxygen 1.5.8