Mage_Adminhtml_Block_Sitemap_Edit_Form Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Sitemap_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('sitemap_form');
00045         $this->setTitle(Mage::helper('adminhtml')->__('Sitemap Information'));
00046     }


Member Function Documentation

_prepareForm (  )  [protected]

Prepare form before rendering HTML

Returns:
Mage_Adminhtml_Block_Widget_Form

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 49 of file Form.php.

00050     {
00051         $model = Mage::registry('sitemap_sitemap');
00052 
00053         $form = new Varien_Data_Form(array(
00054             'id'        => 'edit_form',
00055             'action'    => $this->getData('action'),
00056             'method'    => 'post'
00057         ));
00058 
00059         $fieldset = $form->addFieldset('add_sitemap_form', array('legend' => Mage::helper('sitemap')->__('Sitemap')));
00060 
00061         if ($model->getId()) {
00062             $fieldset->addField('sitemap_id', 'hidden', array(
00063                 'name' => 'sitemap_id',
00064             ));
00065         }
00066 
00067         $fieldset->addField('sitemap_filename', 'text', array(
00068             'label' => Mage::helper('sitemap')->__('Filename'),
00069             'name'  => 'sitemap_filename',
00070             'required' => true,
00071             'note'  => Mage::helper('adminhtml')->__('example: sitemap.xml'),
00072             'value' => $model->getSitemapFilename()
00073         ));
00074 
00075         $fieldset->addField('sitemap_path', 'text', array(
00076             'label' => Mage::helper('sitemap')->__('Path'),
00077             'name'  => 'sitemap_path',
00078             'required' => true,
00079             'note'  => Mage::helper('adminhtml')->__('example: "sitemap/" or "/" for base path (path must be writeable)'),
00080             'value' => $model->getSitemapPath()
00081         ));
00082 
00083         if (!Mage::app()->isSingleStoreMode()) {
00084             $fieldset->addField('store_id', 'select', array(
00085                 'label'    => Mage::helper('sitemap')->__('Store View'),
00086                 'title'    => Mage::helper('sitemap')->__('Store View'),
00087                 'name'     => 'store_id',
00088                 'required' => true,
00089                 'value'    => $model->getStoreId(),
00090                 'values'   => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
00091             ));
00092         }
00093         else {
00094             $fieldset->addField('store_id', 'hidden', array(
00095                 'name'     => 'store_id',
00096                 'value'    => Mage::app()->getStore(true)->getId()
00097             ));
00098             $model->setStoreId(Mage::app()->getStore(true)->getId());
00099         }
00100 
00101         $fieldset->addField('generate', 'hidden', array(
00102             'name'     => 'generate',
00103             'value'    => ''
00104         ));
00105 
00106         $form->setValues($model->getData());
00107 
00108         $form->setUseContainer(true);
00109 
00110         $this->setForm($form);
00111 
00112         return parent::_prepareForm();
00113     }


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

Generated on Sat Jul 4 17:23:02 2009 for Magento by  doxygen 1.5.8