Mage_GoogleOptimizer_Model_Code_Page Class Reference

Inheritance diagram for Mage_GoogleOptimizer_Model_Code_Page:

Mage_GoogleOptimizer_Model_Code Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Attributes

const PAGE_TYPE_VARIANT = 'variant'

Protected Member Functions

 _afterLoad ()
 _beforeSave ()
 _validate ()

Protected Attributes

 $_entityType = 'page'


Detailed Description

Definition at line 34 of file Page.php.


Member Function Documentation

_afterLoad (  )  [protected]

Processing object after load data

Returns:
Mage_Core_Model_Abstract

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 39 of file Page.php.

00040     {
00041         if ($data = $this->getAdditionalData()) {
00042             $data = unserialize($data);
00043             if (isset($data['page_type'])) {
00044                 $this->setPageType($data['page_type']);
00045             }
00046         }
00047         return parent::_afterLoad();
00048     }

_beforeSave (  )  [protected]

Processing object before save data

Returns:
Mage_Core_Model_Abstract

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 50 of file Page.php.

00051     {
00052 
00053         if ($pageType = $this->getData('page_type')) {
00054             $this->setData('additional_data', serialize(array(
00055                 'page_type' => $pageType))
00056             );
00057         }
00058         parent::_beforeSave();
00059     }

_validate (  )  [protected]

Validate sctipts that assigned on entity

Returns:
bool

Reimplemented from Mage_GoogleOptimizer_Model_Code.

Definition at line 61 of file Page.php.

00062     {
00063         if ($this->getPageType() && $this->getPageType() == self::PAGE_TYPE_VARIANT) {
00064             if ($this->getTrackingScript()) {
00065                 return true;
00066             }
00067         }
00068         return parent::_validate();
00069     }


Member Data Documentation

$_entityType = 'page' [protected]

Reimplemented from Mage_GoogleOptimizer_Model_Code.

Definition at line 37 of file Page.php.

const PAGE_TYPE_VARIANT = 'variant'

Definition at line 36 of file Page.php.


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

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