Mage_ProductAlert_Helper_Data Class Reference

Inheritance diagram for Mage_ProductAlert_Helper_Data:

Mage_Core_Helper_Url Mage_Core_Helper_Abstract

List of all members.

Public Member Functions

 getProduct ()
 getCustomer ()
 getStore ()
 getSaveUrl ($type)
 createBlock ($block)


Detailed Description

Definition at line 35 of file Data.php.


Member Function Documentation

createBlock ( block  ) 

Definition at line 60 of file Data.php.

00061     {
00062         $error = Mage::helper('core')->__('Invalid block type: %s', $block);
00063         if (is_string($block)) {
00064             if (strpos($block, '/') !== false) {
00065                 if (!$block = Mage::getConfig()->getBlockClassName($block)) {
00066                     Mage::throwException($error);
00067                 }
00068             }
00069             $fileName = mageFindClassFile($block);
00070             if ($fileName!==false) {
00071                 include_once ($fileName);
00072                 $block = new $block(array());
00073             }
00074         }
00075         if (!$block instanceof Mage_Core_Block_Abstract) {
00076             Mage::throwException($error);
00077         }
00078         return $block;
00079     }

getCustomer (  ) 

Definition at line 42 of file Data.php.

00043     {
00044         return Mage::getSingleton('customer/session');
00045     }

getProduct (  ) 

Definition at line 37 of file Data.php.

00038     {
00039         return Mage::registry('product');
00040     }

getSaveUrl ( type  ) 

Definition at line 52 of file Data.php.

00053     {
00054         return $this->_getUrl('productalert/add/' . $type, array(
00055             'product_id'    => $this->getProduct()->getId(),
00056             Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl()
00057         ));
00058     }

getStore (  ) 

Definition at line 47 of file Data.php.

00048     {
00049         return Mage::app()->getStore();
00050     }


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