Mage_GoogleOptimizer_Block_Code_Conversion Class Reference

Inheritance diagram for Mage_GoogleOptimizer_Block_Code_Conversion:

Mage_GoogleOptimizer_Block_Code Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 setPageType ($pageType)
 getPageType ()

Protected Member Functions

 _initGoogleOptimizerModel ()

Protected Attributes

 $_pageType = null


Detailed Description

Definition at line 36 of file Conversion.php.


Member Function Documentation

_initGoogleOptimizerModel (  )  [protected]

override this method if need something special for type of script

Returns:
Mage_GoogleOptimizer_Block_Code

Reimplemented from Mage_GoogleOptimizer_Block_Code.

Definition at line 40 of file Conversion.php.

00041     {
00042         $collection = Mage::getModel('googleoptimizer/code')
00043             ->getCollection();
00044 
00045         if ($this->getPageType()) {
00046             $collection->addFieldToFilter('conversion_page', $this->getPageType());
00047         }
00048 
00049         $conversionCodes = array();
00050         foreach ($collection as $_item) {
00051             $conversionCodes[] = $_item->getConversionScript();
00052         }
00053         $this->_setGoogleOptimizerModel(
00054             new Varien_Object(array(
00055                 'conversion_script' => implode('', $conversionCodes)
00056             ))
00057         );
00058         return parent::_initGoogleOptimizerModel();
00059     }

getPageType (  ) 

Definition at line 67 of file Conversion.php.

00068     {
00069         return $this->_pageType;
00070     }

setPageType ( pageType  ) 

Definition at line 61 of file Conversion.php.

00062     {
00063         $this->_pageType = $pageType;
00064         return $this;
00065     }


Member Data Documentation

$_pageType = null [protected]

Definition at line 38 of file Conversion.php.


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

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