Mage_ProductAlert_Block_Stock Class Reference

Inheritance diagram for Mage_ProductAlert_Block_Stock:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 isShow ()
 getUrl ($route= '', $params=array())


Detailed Description

Definition at line 35 of file Stock.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 37 of file Stock.php.

00038     {
00039         parent::__construct();
00040         $this->setTemplate('productalert/stock.phtml');
00041     }


Member Function Documentation

getUrl ( route = '',
params = array() 
)

Generate url by route and parameters

Parameters:
string $route
array $params
Returns:
string

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 57 of file Stock.php.

00058     {
00059         return Mage::helper('productalert')->getSaveUrl('stock');
00060     }

isShow (  ) 

Definition at line 43 of file Stock.php.

00044     {
00045         if (!Mage::getStoreConfig('catalog/productalert/allow_stock')) {
00046             return false;
00047         }
00048 
00049         if (!$product = Mage::helper('productalert')->getProduct()) {
00050             return false;
00051         }
00052         /* @var $product Mage_Catalog_Model_Product */
00053 
00054         return !$product->isSaleable();
00055     }


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

Generated on Sat Jul 4 17:24:35 2009 for Magento by  doxygen 1.5.8