Mage_Adminhtml_Block_Catalog_Product_Attribute_New_Product_Created Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Attribute_New_Product_Created:

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 ()
 getCloseButtonHtml ()
 getAttributesBlockJson ()

Protected Member Functions

 _prepareLayout ()
 _getGroupAttributes ()


Detailed Description

Definition at line 34 of file Created.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 36 of file Created.php.

00037     {
00038         parent::__construct();
00039         $this->setTemplate('catalog/product/attribute/new/created.phtml');
00040     }


Member Function Documentation

_getGroupAttributes (  )  [protected]

Definition at line 62 of file Created.php.

00063     {
00064         $attributes = array();
00065         $product = Mage::registry('product');
00066         /* @var $product Mage_Catalog_Model_Product */
00067         foreach($product->getAttributes($this->getRequest()->getParam('group')) as $attribute) {
00068             /* @var $attribute Mage_Eav_Model_Entity_Attribute */
00069             if ($attribute->getId() == $this->getRequest()->getParam('attribute')) {
00070                 $attributes[] = $attribute;
00071             }
00072         }
00073         return $attributes;
00074     }

_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 42 of file Created.php.

00043     {
00044 
00045         $this->setChild(
00046             'attributes',
00047             $this->getLayout()->createBlock('adminhtml/catalog_product_attribute_new_product_attributes')
00048                 ->setGroupAttributes($this->_getGroupAttributes())
00049         );
00050 
00051         $this->setChild(
00052             'close_button',
00053             $this->getLayout()->createBlock('adminhtml/widget_button')
00054                 ->setData(array(
00055                     'label'   => Mage::helper('catalog')->__('Close Window'),
00056                     'onclick' => 'addAttribute(true)'
00057                 ))
00058         );
00059 
00060     }

getAttributesBlockJson (  ) 

Definition at line 81 of file Created.php.

00082     {
00083         $result = array(
00084             $this->getRequest()->getParam('tab') => $this->getChildHtml('attributes')
00085         );
00086 
00087         return Zend_Json::encode($result);
00088     }

getCloseButtonHtml (  ) 

Definition at line 76 of file Created.php.

00077     {
00078         return $this->getChildHtml('close_button');
00079     }


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