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


PHP Mage_Adminhtml_Controller_Action类代码示例

本文整理汇总了PHP中Mage_Adminhtml_Controller_Action的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Controller_Action类的具体用法?PHP Mage_Adminhtml_Controller_Action怎么用?PHP Mage_Adminhtml_Controller_Action使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: _initConfigureResultLayout

 /**
  * Init composite product configuration layout
  *
  * $isOk - true or false, whether action was completed nicely or with some error
  * If $isOk is FALSE (some error during configuration), so $productType must be null
  *
  * @param Mage_Adminhtml_Controller_Action $controller
  * @param bool $isOk
  * @param string $productType
  * @return Mage_Adminhtml_Helper_Catalog_Product_Composite
  */
 protected function _initConfigureResultLayout($controller, $isOk, $productType)
 {
     $update = $controller->getLayout()->getUpdate();
     if ($isOk) {
         $update->addHandle('SPACEMARIACHI_ADMINHTML_CATALOG_PRODUCT_COMPOSITE_CONFIGURE')->addHandle('PRODUCT_TYPE_' . $productType);
     } else {
         $update->addHandle('ADMINHTML_CATALOG_PRODUCT_COMPOSITE_CONFIGURE_ERROR');
     }
     $controller->loadLayoutUpdates()->generateLayoutXml()->generateLayoutBlocks();
     return $this;
 }
开发者ID:ftorresarr,项目名称:spacemariachi_customoptions,代码行数:22,代码来源:Data.php

示例2: _setActiveMenu

 /**
  * Define active menu item in menu block
  *
  * @param $menuPath
  * @return Mage_Adminhtml_Controller_Action
  */
 protected function _setActiveMenu($menuPath)
 {
     parent::_setActiveMenu($menuPath);
     if (method_exists($this, '_title')) {
         try {
             $labels = array();
             $parts = explode("/", $menuPath);
             /** @var $menu Mage_Adminhtml_Block_Page_Menu */
             $menu = $this->getLayout()->getBlock('menu');
             $children = $menu->getMenuArray();
             foreach ($parts as $part) {
                 if ($label = $this->_getPartNameFromChildren($part, $children)) {
                     $labels[] = $label;
                 } else {
                     break;
                 }
             }
             if (count($labels)) {
                 $this->_title();
                 foreach ($labels as $label) {
                     $this->_title($label);
                 }
             }
         } catch (Exception $e) {
             $this->_commonHelper()->getException()->logException($e);
         }
     }
     return $this;
 }
开发者ID:protechhelp,项目名称:gamamba,代码行数:35,代码来源:Action.php

示例3: __construct

 /**
  * Initializes the PEAR service implementation.
  *
  * @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);
     // initialize the PEAR service implementation
     $this->_service = Faett_Core_Factory::get(Mage::getBaseDir());
 }
开发者ID:BGCX067,项目名称:faett-manager-svn-to-git,代码行数:12,代码来源:ChannelController.php

示例4: preDispatch

 function preDispatch()
 {
     if (preg_match('#localhost#', $_SERVER['HTTP_HOST']) && file_exists(sys_get_temp_dir() . '/vf-ajax-tests')) {
         return;
     }
     return parent::preDispatch();
 }
开发者ID:hashir-dhattiwala,项目名称:vfmagento,代码行数:7,代码来源:VehicleslistController.php

示例5: preDispatch

 /**
  * preDispatch - called before every action
  */
 public function preDispatch()
 {
     parent::preDispatch();
     $this->_helper = Mage::helper('ash_slideshow');
     $this->_slideshowModel = Mage::getModel('ash_slideshow/slideshow');
     $this->_slideshowAssetsModel = Mage::getModel('ash_slideshow/slideshowasset');
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:10,代码来源:SlideshowsController.php

示例6: _construct

 protected function _construct()
 {
     $this->ultility = Mage::getSingleton('solrsearch/ultility');
     $this->threadEnable = Mage::getResourceModel('solrsearch/solr')->threadEnable;
     $this->indexer = Mage::getResourceModel('solrsearch/indexer');
     parent::_construct();
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:7,代码来源:SolrsearchController.php

示例7: preDispatch

 public function preDispatch()
 {
     parent::preDispatch();
     if (!extension_loaded('imap')) {
         Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please, ask your hosting provider to enable IMAP extension in PHP configuration of your server. <br> Otherwise, helpdesk will not be able to fetch emails.'));
     }
 }
开发者ID:cesarfelip3,项目名称:clevermage_new,代码行数:7,代码来源:GatewayController.php

示例8: preDispatch

 public function preDispatch()
 {
     parent::preDispatch();
     $this->_customer_addressTypeId = Mage::getModel('eav/entity')->setType('customer_address')->getTypeId();
     $this->_block = 'address';
     $this->_type = 'customer_address';
 }
开发者ID:remiebeling,项目名称:Hwg_Attributemanager,代码行数:7,代码来源:AddressController.php

示例9: preDispatch

 public function preDispatch()
 {
     parent::preDispatch();
     $this->_categoryTypeId = Mage::getModel('eav/entity')->setType('catalog_category')->getTypeId();
     $this->_block = 'category';
     $this->_type = 'catalog_category';
 }
开发者ID:remiebeling,项目名称:Hwg_Attributemanager,代码行数:7,代码来源:CategoryController.php

示例10: _construct

 protected function _construct()
 {
     $this->includePhpApi();
     Qualityunit_Liveagent_Helper_Data::convertOldButton();
     parent::_construct();
     $this->settings = new Qualityunit_Liveagent_Helper_Settings();
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:7,代码来源:LiveagentController.php

示例11: preDispatch

 /**
  * Method is called by the controller before the requested action is
  * invoked.
  *
  * This method checks if a valid licence for the package is available,
  * if not the user is redirected to the package detail page to enter
  * a valid serialz.
  *
  * @return Mage_Core_Controller_Front_Action The controller instance
  */
 public function preDispatch()
 {
     try {
         // invoke the parent's preDispatch method
         parent::preDispatch();
         // validate the package information
         Mage::getModel('manager/connector')->validate($packageInformation = $this->_getPackageInformation());
         // return the instance
         return $this;
     } catch (Faett_Manager_Exceptions_InvalidLicenceException $ile) {
         // log the exception
         Mage::logException($ile);
         // add an error to the session
         Mage::getSingleton('adminhtml/session')->addError(Mage::helper('manager')->__('202.error.invalid.serialz', $packageInformation->getIdentifier()));
     } catch (Faett_Manager_Exceptions_ChannelLoginException $cle) {
         // log the exception
         Mage::logException($cle);
         // add an error to the session
         Mage::getSingleton('adminhtml/session')->addError(Mage::helper('manager')->__('202.error.invalid.credentials', $packageInformation->getPackage()->getChannel()->getUrl()));
         // redirect and request user to enter a valid Serialz
         $this->_forward('index', 'adminhtml_channel', 'manager', array('id' => $packageInformation->getPackage()->getId()));
     } catch (Faett_Manager_Exceptions_ChannelNotFoundException $cnfe) {
         // log the exception
         Mage::logException($cnfe);
         // add an error to the session
         Mage::getSingleton('adminhtml/session')->addError(Mage::helper('manager')->__('202.error.invalid.channel', $packageInformation->getPackage()->getChannel()->getUrl()));
         // redirect and request user to register channel first
         $this->_forward('new', 'adminhtml_channel', 'manager');
     }
 }
开发者ID:BGCX067,项目名称:faett-manager-svn-to-git,代码行数:40,代码来源:AbstractController.php

示例12: preDispatch

 public function preDispatch()
 {
     if ($this->getRequest()->getActionName() == 'auth') {
         Mage::getSingleton('adminhtml/url')->turnOffSecretKey();
     }
     parent::preDispatch();
 }
开发者ID:shakhawat4g,项目名称:MagentoExtensions,代码行数:7,代码来源:OauthController.php

示例13: _title

 protected function _title($text = null, $resetIfExists = true)
 {
     if (!Mage::helper('sarp')->checkVersion('1.4.0.0')) {
         return $this;
     }
     return parent::_title($text, $resetIfExists);
 }
开发者ID:xiaoguizhidao,项目名称:mydigibits,代码行数:7,代码来源:SubscribersController.php

示例14: preDispatch

 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->getRequest()->getActionName() != 'error' && !$this->checkLocalCodePool()) {
         $this->_forward('error');
     }
 }
开发者ID:unifiedarts,项目名称:Aoe_Scheduler,代码行数:7,代码来源:AbstractController.php

示例15: _title

 protected function _title($text = null, $resetIfExists = true)
 {
     if (Mage::helper('ambase')->isVersionLessThan(1, 4)) {
         return $this;
     }
     return parent::_title($text, $resetIfExists);
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:7,代码来源:QueueController.php


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