Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit:

Mage_Adminhtml_Block_Widget_Form_Container Mage_Adminhtml_Block_Widget_Container Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getHeaderText ()
 getValidationUrl ()
 getSaveUrl ()


Detailed Description

Definition at line 35 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 Mage_Adminhtml_Block_Widget_Form_Container.

Definition at line 38 of file Edit.php.

00039     {
00040         $this->_objectId = 'attribute_id';
00041         $this->_controller = 'catalog_product_attribute';
00042 
00043         parent::__construct();
00044 
00045         if($this->getRequest()->getParam('popup')) {
00046             $this->_removeButton('back');
00047             $this->_addButton(
00048                 'close',
00049                 array(
00050                     'label'     => Mage::helper('catalog')->__('Close Window'),
00051                     'class'     => 'cancel',
00052                     'onclick'   => 'window.close()',
00053                     'level'     => -1
00054                 )
00055             );
00056         }
00057 
00058         $this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save Attribute'));
00059         $this->_addButton(
00060             'save_and_edit_button',
00061             array(
00062                 'label'     => Mage::helper('catalog')->__('Save And Continue Edit'),
00063                 'onclick'   => 'saveAndContinueEdit()',
00064                 'class'     => 'save'
00065             ),
00066             100
00067         );
00068 
00069         if (! Mage::registry('entity_attribute')->getIsUserDefined()) {
00070             $this->_removeButton('delete');
00071         } else {
00072             $this->_updateButton('delete', 'label', Mage::helper('catalog')->__('Delete Attribute'));
00073         }
00074     }


Member Function Documentation

getHeaderText (  ) 

Get header text

Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Container.

Definition at line 76 of file Edit.php.

00077     {
00078         if (Mage::registry('entity_attribute')->getId()) {
00079             $frontendLabel = Mage::registry('entity_attribute')->getFrontendLabel();
00080             if (is_array($frontendLabel)) {
00081                 $frontendLabel = $frontendLabel[0];
00082             }
00083             return Mage::helper('catalog')->__('Edit Product Attribute "%s"', $this->htmlEscape($frontendLabel));
00084         }
00085         else {
00086             return Mage::helper('catalog')->__('New Product Attribute');
00087         }
00088     }

getSaveUrl (  ) 

Get form save URL

Deprecated:
See also:
getFormActionUrl()
Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Form_Container.

Definition at line 95 of file Edit.php.

00096     {
00097         return $this->getUrl('*/'.$this->_controller.'/save', array('_current'=>true, 'back'=>null));
00098     }

getValidationUrl (  ) 

Definition at line 90 of file Edit.php.

00091     {
00092         return $this->getUrl('*/*/validate', array('_current'=>true));
00093     }


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