Mage_Page_Model_Config Class Reference

List of all members.

Public Member Functions

 getPageLayouts ()
 getPageLayout ($layoutCode)
 getPageLayoutHandles ()

Public Attributes

const XML_PATH_PAGE_LAYOUTS = 'global/page/layouts'

Protected Member Functions

 _initPageLayouts ()

Protected Attributes

 $_pageLayouts = null


Detailed Description

Definition at line 34 of file Config.php.


Member Function Documentation

_initPageLayouts (  )  [protected]

Initialize page layouts list

Returns:
Mage_Page_Model_Config

Definition at line 50 of file Config.php.

00051     {
00052         if ($this->_pageLayouts === null) {
00053             $this->_pageLayouts = array();
00054 
00055             foreach (Mage::getConfig()->getNode(self::XML_PATH_PAGE_LAYOUTS)->children() as $layoutCode => $layoutConfig) {
00056                 $this->_pageLayouts[$layoutCode] = new Varien_Object(array(
00057                     'label' => Mage::helper('page')->__((string)$layoutConfig->label),
00058                     'code' => $layoutCode,
00059                     'template' => (string) $layoutConfig->template,
00060                     'layout_handle' => (string) $layoutConfig->layout_handle
00061                 ));
00062             }
00063         }
00064 
00065         return $this;
00066     }

getPageLayout ( layoutCode  ) 

Retrieve page layout by code

Parameters:
string $layoutCode
Returns:
Varien_Object|boolean

Definition at line 85 of file Config.php.

00086     {
00087         $this->_initPageLayouts();
00088 
00089         if (isset($this->_pageLayouts[$layoutCode])) {
00090             return $this->_pageLayouts[$layoutCode];
00091         }
00092 
00093         return false;
00094     }

getPageLayoutHandles (  ) 

Retrieve page layout handles

Returns:
array

Definition at line 101 of file Config.php.

00102     {
00103         $handles = array();
00104 
00105         foreach ($this->getPageLayouts() as $layout) {
00106             $handles[$layout->getCode()] = $layout->getLayoutHandle();
00107         }
00108 
00109         return $handles;
00110     }

getPageLayouts (  ) 

Retrieve available page layouts

Returns:
array

Definition at line 73 of file Config.php.

00074     {
00075         $this->_initPageLayouts();
00076         return $this->_pageLayouts;
00077     }


Member Data Documentation

$_pageLayouts = null [protected]

Definition at line 43 of file Config.php.

const XML_PATH_PAGE_LAYOUTS = 'global/page/layouts'

Definition at line 36 of file Config.php.


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

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