Public Member Functions | |
getProduct () | |
getCustomer () | |
getStore () | |
getSaveUrl ($type) | |
createBlock ($block) |
Definition at line 35 of file Data.php.
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 | ( | ) |
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 | ( | ) |