当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Controller_Front_Action::__construct方法代码示例

本文整理汇总了PHP中Mage_Core_Controller_Front_Action::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Controller_Front_Action::__construct方法的具体用法?PHP Mage_Core_Controller_Front_Action::__construct怎么用?PHP Mage_Core_Controller_Front_Action::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Controller_Front_Action的用法示例。


在下文中一共展示了Mage_Core_Controller_Front_Action::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     parent::__construct($request, $response, $invokeArgs);
     $post = $this->getRequest()->getParams();
     if (isset($post['action']) && isset($post['submodule'])) {
         $json = Mage::helper('core')->jsonDecode($post['values']);
         if (isset($json['parent'])) {
             $url = Mage::helper('ajaxKit')->clearUrl($json['parent']['url']);
             $url_arr = explode('?', $url);
             $url = $url_arr[0];
             if ('product' == $json['parent']['controller'] || 'category' == $json['parent']['controller']) {
                 $oRewrite = Mage::getModel('core/url_rewrite')->setStoreId(Mage::app()->getStore()->getId())->loadByRequestPath($url);
                 if ('product' == $json['parent']['controller']) {
                     Mage::register('current_product', Mage::getModel('catalog/product')->load((int) $oRewrite->getProductId()));
                 } else {
                     Mage::register('current_category', Mage::getModel('catalog/category')->load((int) $oRewrite->getCategoryId()));
                 }
             } elseif ('cms' == $json['parent']['module']) {
                 if ('index' == $json['parent']['controller']) {
                     $pageId = Mage::getStoreConfig(Mage_Cms_Helper_Page::XML_PATH_HOME_PAGE);
                     Mage::getSingleton('cms/page')->load($pageId);
                 } else {
                     Mage::getSingleton('cms/page')->load($url, 'identifier');
                 }
             }
             Mage::register('meigee_ajax', $json['parent']);
         }
     }
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:29,代码来源:IndexController.php

示例2: __construct

 public function __construct(\Zend_Controller_Request_Abstract $request, \Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->pfPayment = Payfort_Fort_Payment::getInstance();
     $this->pfHelper = Payfort_Fort_Helper::getInstance();
     $this->pfOrder = new Payfort_Fort_Order();
     $this->integrationType = 'redirection';
     parent::__construct($request, $response, $invokeArgs);
 }
开发者ID:payfort,项目名称:magento-payfort,代码行数:9,代码来源:PaymentController.php

示例3: __construct

 public function __construct(\Zend_Controller_Request_Abstract $request, \Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     $helper = new \Expressly_Expressly_Helper_Client();
     $this->app = $helper->getApp();
     $this->merchantProvider = $this->app['merchant.provider'];
     $this->resolver = $this->app['route.resolver'];
     $this->dispatcher = $this->app['dispatcher'];
     $this->logger = $this->app['logger'];
     parent::__construct($request, $response, $invokeArgs);
 }
开发者ID:expressly,项目名称:magento,代码行数:10,代码来源:AbstractController.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     // $this->_keepFrame = $this->getFrontConfig ( 'image_frame' ) < 1;
     // $thumbnailSize = $this->getFrontConfig ( 'thumbnail_image' );
     // $mainSize = $this->getFrontConfig ( 'main_image' );
     // if (intval ( $thumbnailSize ) > 80) {
     // $this->thumbnail_with = intval ( $thumbnailSize );
     // if (($index = stripos ( $thumbnailSize, 'x' ))) {
     // $height = intval ( trim ( substr ( $thumbnailSize, $index + 1 ) ) );
     // $this->thumbnail_height = $height > 80 ? $height : null;
     // }
     // }
     // if (intval ( $mainSize ) > 160) {
     // $this->main_with = intval ( $mainSize );
     // if (($index = stripos ( $mainSize, 'x' ))) {
     // $height = intval ( trim ( substr ( $mainSize, $index + 1 ) ) );
     // $this->main_height = $height > 160 ? $height : null;
     // }
     // }
     // $this->_keepAspectRatio = $this->main_height < 1;
 }
开发者ID:guohuadeng,项目名称:stampApp,代码行数:22,代码来源:ItemController.php

示例5: __construct

 /**
  * Initializes the class.
  *
  * @return void
  */
 public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     // call the parent constructor
     parent::__construct($request, $response, $invokeArgs);
 }
开发者ID:BGCX067,项目名称:faett-channel-svn-to-git,代码行数:10,代码来源:IndexController.php

示例6: __construct

 public function __construct($context)
 {
     parent::__construct(\Mage::app()->getRequest(), \Mage::app()->getResponse());
 }
开发者ID:ThomasNegeli,项目名称:Compatibility,代码行数:4,代码来源:Action.php


注:本文中的Mage_Core_Controller_Front_Action::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。