Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formgroup Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main_Formgroup:

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


Detailed Description

Definition at line 33 of file Formgroup.php.


Constructor & Destructor Documentation

__construct (  ) 

Class constructor

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 35 of file Formgroup.php.

00036     {
00037         parent::__construct();
00038     }


Member Function Documentation

_getSetId (  )  [protected]

Definition at line 80 of file Formgroup.php.

00081     {
00082         return ( intval($this->getRequest()->getParam('id')) > 0 )
00083                     ? intval($this->getRequest()->getParam('id'))
00084                     : Mage::getModel('eav/entity_type')
00085                         ->load(Mage::registry('entityType'))
00086                         ->getDefaultAttributeSetId();
00087     }

_prepareForm (  )  [protected]

Prepare form before rendering HTML

Returns:
Mage_Adminhtml_Block_Widget_Form

Reimplemented from Mage_Adminhtml_Block_Widget_Form.

Definition at line 40 of file Formgroup.php.

00041     {
00042         $form = new Varien_Data_Form();
00043 
00044         $fieldset = $form->addFieldset('set_fieldset', array('legend'=>Mage::helper('catalog')->__('Add New Group')));
00045 
00046         $fieldset->addField('attribute_group_name', 'text',
00047                             array(
00048                                 'label' => Mage::helper('catalog')->__('Name'),
00049                                 'name' => 'attribute_group_name',
00050                                 'required' => true,
00051                             )
00052         );
00053 
00054         $fieldset->addField('submit', 'note',
00055                             array(
00056                                 'text' => $this->getLayout()->createBlock('adminhtml/widget_button')
00057                                             ->setData(array(
00058                                                 'label'     => Mage::helper('catalog')->__('Add Group'),
00059                                                 'onclick'   => 'this.form.submit();',
00060                                                                                                 'class' => 'add'
00061                                             ))
00062                                             ->toHtml(),
00063                             )
00064         );
00065 
00066         $fieldset->addField('attribute_set_id', 'hidden',
00067                             array(
00068                                 'name' => 'attribute_set_id',
00069                                 'value' => $this->_getSetId(),
00070                             )
00071 
00072         );
00073 
00074         $form->setUseContainer(true);
00075         $form->setMethod('post');
00076         $form->setAction($this->getUrl('*/catalog_product_group/save'));
00077         $this->setForm($form);
00078     }


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

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