Public Member Functions | |
__construct () | |
getAccordionHtml () | |
Protected Member Functions | |
_prepareLayout () |
Definition at line 36 of file Alerts.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 38 of file Alerts.php.
00039 { 00040 parent::__construct(); 00041 $this->setTemplate('catalog/product/tab/alert.phtml'); 00042 }
_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 44 of file Alerts.php.
00045 { 00046 $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion') 00047 ->setId('productAlerts'); 00048 /* @var $accordion Mage_Adminhtml_Block_Widget_Accordion */ 00049 00050 $alertPriceAllow = Mage::getStoreConfig('catalog/productalert/allow_price'); 00051 $alertStockAllow = Mage::getStoreConfig('catalog/productalert/allow_stock'); 00052 00053 if ($alertPriceAllow) { 00054 $accordion->addItem('price', array( 00055 'title' => Mage::helper('adminhtml')->__('Price alert subscription was saved successfully'), 00056 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_alerts_price')->toHtml() . '<br />', 00057 'open' => true 00058 )); 00059 } 00060 if ($alertStockAllow) { 00061 $accordion->addItem('stock', array( 00062 'title' => Mage::helper('adminhtml')->__('Stock notification was saved successfully'), 00063 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_alerts_stock'), 00064 'open' => true 00065 )); 00066 } 00067 00068 $this->setChild('accordion', $accordion); 00069 00070 return parent::_prepareLayout(); 00071 }
getAccordionHtml | ( | ) |
Definition at line 73 of file Alerts.php.
00074 { 00075 return $this->getChildHtml('accordion'); 00076 }