Mage_Core_Model_App_Area Class Reference
List of all members.
Detailed Description
Application area nodel
- Author:
- Magento Core Team <core@magentocommerce.com>
Definition at line 32 of file Area.php.
Constructor & Destructor Documentation
__construct |
( |
$ |
areaCode, |
|
|
$ |
application | |
|
) |
| | |
Definition at line 64 of file Area.php.
00065 {
00066 $this->_code = $areaCode;
00067 $this->_application = $application;
00068 }
Member Function Documentation
_initConfig |
( |
|
) |
[protected] |
_initDesign |
( |
|
) |
[protected] |
Definition at line 149 of file Area.php.
00150 {
00151 $designPackage = Mage::getSingleton('core/design_package');
00152 if ($designPackage->getArea() != self::AREA_FRONTEND)
00153 return;
00154
00155 $currentStore = Mage::app()->getStore()->getStoreId();
00156
00157 $designChange = Mage::getSingleton('core/design')
00158 ->loadChange($currentStore);
00159
00160 if ($designChange->getData()) {
00161 $designPackage->setPackageName($designChange->getPackage())
00162 ->setTheme($designChange->getTheme());
00163 }
00164 }
_initEvents |
( |
|
) |
[protected] |
Definition at line 136 of file Area.php.
00137 {
00138 Mage::app()->addEventArea($this->_code);
00139 #Mage::app()->getConfig()->loadEventObservers($this->_code);
00140 return $this;
00141 }
_initTranslate |
( |
|
) |
[protected] |
Definition at line 143 of file Area.php.
00144 {
00145 Mage::app()->getTranslator()->init($this->_code);
00146 return $this;
00147 }
_loadPart |
( |
$ |
part |
) |
[protected] |
Loading part of area
- Parameters:
-
- Returns:
- Mage_Core_Model_App_Area
Definition at line 106 of file Area.php.
00107 {
00108 if (isset($this->_loadedParts[$part])) {
00109 return $this;
00110 }
00111 Varien_Profiler::start('mage::dispatch::controller::action::predispatch::load_area::'.$this->_code.'::'.$part);
00112 switch ($part) {
00113 case self::PART_CONFIG:
00114 $this->_initConfig();
00115 break;
00116 case self::PART_EVENTS:
00117 $this->_initEvents();
00118 break;
00119 case self::PART_TRANSLATE:
00120 $this->_initTranslate();
00121 break;
00122 case self::PART_DESIGN:
00123 $this->_initDesign();
00124 break;
00125 }
00126 $this->_loadedParts[$part] = true;
00127 Varien_Profiler::stop('mage::dispatch::controller::action::predispatch::load_area::'.$this->_code.'::'.$part);
00128 return $this;
00129 }
Load area data
- Parameters:
-
- Returns:
- Mage_Core_Model_App_Area
Definition at line 86 of file Area.php.
00087 {
00088 if (is_null($part)) {
00089 $this->_loadPart(self::PART_CONFIG)
00090 ->_loadPart(self::PART_EVENTS)
00091 ->_loadPart(self::PART_DESIGN)
00092 ->_loadPart(self::PART_TRANSLATE);
00093 }
00094 else {
00095 $this->_loadPart($part);
00096 }
00097 return $this;
00098 }
Member Data Documentation
$_application [protected] |
$_loadedParts [protected] |
The documentation for this class was generated from the following file:
- app/code/core/Mage/Core/Model/App/Area.php