本文整理汇总了PHP中Mage_Core_Model_Layout::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Layout::__construct方法的具体用法?PHP Mage_Core_Model_Layout::__construct怎么用?PHP Mage_Core_Model_Layout::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Layout
的用法示例。
在下文中一共展示了Mage_Core_Model_Layout::__construct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
function __construct()
{
if (Mage::app()->getRequest()->getParam('isAjax') && Mage::registry('meigee_ajax')) {
$meigee_ajax = Mage::registry('meigee_ajax');
$module = $meigee_ajax['module'];
$controller = $meigee_ajax['controller'];
} else {
$module = Mage::app()->getRequest()->getModuleName();
$controller = Mage::app()->getRequest()->getControllerName();
}
// if ('admin' == $module && 'thememanager' == $controller)
if ('thememanager' == $controller) {
$module = 'thememanager';
$controller = 'adminhtml_thememanager';
}
$controller_arr = explode('_', $controller);
$controller_arr = array_map('ucfirst', $controller_arr);
$imploded_controller_arr = implode('_', $controller_arr);
$model_file = Mage::getConfig()->getModuleDir('', 'Meigee_Thememanager') . DS . 'Model' . DS . 'PageTypeConfigs' . DS . ucfirst($module) . DS . implode(DS, $controller_arr) . '.php';
$model_file_compiled = __DIR__ . DS . 'Meigee_Thememanager_Model_PageTypeConfigs_' . ucfirst($module) . '_' . $imploded_controller_arr . '.php';
if ((is_file($model_file) || is_file($model_file_compiled)) && class_exists('Meigee_Thememanager_Model_PageTypeConfigs_' . ucfirst($module) . '_' . $imploded_controller_arr)) {
$model = Mage::getModel('thememanager/pageTypeConfigs_' . $module . '_' . $controller);
} else {
if ('cms' == strtolower($module)) {
$model = Mage::getModel('thememanager/pageTypeConfigs_' . $module . '_Page');
} else {
$model = Mage::getModel('thememanager/pageTypeConfigs_default');
}
}
$model->getInstance();
parent::__construct();
}
示例2: __construct
/**
* Class Constuctor
*
* @param array $data
*/
public function __construct($data = array())
{
parent::__construct($data);
}
示例3: __construct
/**
* @param Mage_Core_Model_BlockFactory $blockFactory
* @param Magento_Data_Structure $structure
* @param Mage_Core_Model_Layout_Argument_Processor $argumentProcessor
* @param Mage_Core_Model_Layout_Translator $translator
* @param Mage_Core_Model_Layout_ScheduledStructure $scheduledStructure
* @param Mage_DesignEditor_Block_Template $wrapperBlock
* @param Mage_DesignEditor_Helper_Data $helper
* @param string $area
*/
public function __construct(Mage_Core_Model_BlockFactory $blockFactory, Magento_Data_Structure $structure, Mage_Core_Model_Layout_Argument_Processor $argumentProcessor, Mage_Core_Model_Layout_Translator $translator, Mage_Core_Model_Layout_ScheduledStructure $scheduledStructure, Mage_DesignEditor_Block_Template $wrapperBlock, Mage_DesignEditor_Helper_Data $helper, $area = Mage_Core_Model_Design_Package::DEFAULT_AREA)
{
$this->_wrapperBlock = $wrapperBlock;
$this->_helper = $helper;
parent::__construct($blockFactory, $structure, $argumentProcessor, $translator, $scheduledStructure, $area);
}