Public Member Functions | |
__construct () | |
getCloseButtonHtml () | |
getAttributesBlockJson () | |
Protected Member Functions | |
_prepareLayout () | |
_getGroupAttributes () |
Definition at line 34 of file Created.php.
__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 }
_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
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 }