Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getAccordionHtml ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

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

00039     {
00040         parent::__construct();
00041         $this->setTemplate('catalog/product/tab/alert.phtml');
00042     }


Member Function Documentation

_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 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     }


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

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