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


PHP Mage_Core_Controller_Varien_Action::getResponse方法代码示例

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


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

示例1: getRedirectionUrl

 protected function getRedirectionUrl(Mage_Core_Controller_Varien_Action $controller)
 {
     $headers = $controller->getResponse()->getHeaders();
     $redirectLocation = "";
     foreach ($headers as $item) {
         if ($item['name'] == 'Location') {
             $redirectLocation = $item['value'];
         }
     }
     return $redirectLocation;
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:11,代码来源:MotoObserver.php

示例2: authenticate

 /**
  * Authenticate controller action by login customer
  *
  * @param   Mage_Core_Controller_Varien_Action $action
  * @param   bool $loginUrl
  * @return  bool
  */
 public function authenticate(Mage_Core_Controller_Varien_Action $action, $loginUrl = null)
 {
     if ($this->isLoggedIn()) {
         return true;
     }
     $this->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_current' => true)));
     if (isset($loginUrl)) {
         $action->getResponse()->setRedirect($loginUrl);
     } else {
         $action->setRedirectWithCookieCheck(Mage_Customer_Helper_Data::ROUTE_ACCOUNT_LOGIN, Mage::helper('customer')->getLoginUrlParams());
     }
     return false;
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:20,代码来源:Session.php

示例3: authenticate

 /**
  * Authenticate controller action by login customer
  *
  * @param   Mage_Core_Controller_Varien_Action $action
  * @return  bool
  */
 public function authenticate(Mage_Core_Controller_Varien_Action $action, $loginUrl = null)
 {
     if (!$this->isLoggedIn()) {
         $this->setBeforeAuthUrl(AO::getUrl('*/*/*', array('_current' => true)));
         if (is_null($loginUrl)) {
             $loginUrl = AO::helper('customer')->getLoginUrl();
         }
         $action->getResponse()->setRedirect($loginUrl);
         return false;
     }
     return true;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:18,代码来源:Session.php

示例4: redirectToProductUrl

 /**
  * @param Mage_Core_Controller_Varien_Action
  * @param Mage_Catalog_Model_Product
  */
 protected function redirectToProductUrl(Mage_Core_Controller_Varien_Action $controllerAction, Mage_Catalog_Model_Product $product)
 {
     $controllerAction->getResponse()->setRedirect($product->getProductUrl());
 }
开发者ID:ryaan-anthony,项目名称:magento-search-sku-redirect,代码行数:8,代码来源:Observer.php

示例5: testNoCookiesAction

 /**
  * @magentoAppIsolation enabled
  */
 public function testNoCookiesAction()
 {
     $this->assertEmpty($this->_model->getResponse()->getBody());
     $this->_model->noCookiesAction();
     $this->assertNotEmpty($this->_model->getResponse()->getBody());
 }
开发者ID:nemphys,项目名称:magento2,代码行数:9,代码来源:ActionTest.php

示例6: authenticate

 /**
  * Authenticate controller action by login customer
  *
  * @param   Mage_Core_Controller_Varien_Action $action
  * @param   bool $loginUrl
  * @return  bool
  */
 public function authenticate(Mage_Core_Controller_Varien_Action $action, $loginUrl = null)
 {
     if (!$this->_getSession()->isLoggedIn()) {
         if ($action->getRequest()->isAjax()) {
             $this->_getSession()->setBeforeVendorAuthUrl(Mage::getUrl('*/vendor/', array('_current' => true, '_secure' => true, '_nosid' => true)));
         } else {
             $oAuthUrl = Mage::getUrl('*/*/*', array('_current' => true, '_secure' => true, '_nosid' => true));
             $this->_getSession()->setBeforeVendorAuthUrl($oAuthUrl);
         }
         if (is_null($loginUrl)) {
             if (Mage::getConfig()->getModuleConfig('Ced_CsVendorPanel')->is('active', 'true')) {
                 $url = 'csmarketplace/account/login';
             } else {
                 $url = 'customer/account/login';
             }
             $loginUrl = Mage::getUrl($url, array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure(), '_nosid' => true));
         }
         if ($action->getRequest()->isAjax()) {
             $ajaxResponse = array();
             $ajaxResponse['ajaxExpired'] = true;
             $ajaxResponse['ajaxRedirect'] = $loginUrl;
             $action->getResponse()->setBody(json_encode($ajaxResponse));
             return;
         }
         $action->getResponse()->setRedirect($loginUrl);
         return false;
     }
     if ($this->_getSession()->isLoggedIn() && Mage::helper('csmarketplace')->authenticate($this->_getSession()->getCustomerId())) {
         $vendor = Mage::getModel('csmarketplace/vendor')->loadByCustomerId($this->_getSession()->getCustomerId());
         if ($vendor && $vendor->getId()) {
             $this->_getSession()->setData('vendor_id', $vendor->getId());
             $this->_getSession()->setData('vendor', $vendor);
             Mage::dispatchEvent('ced_csmarketplace_vendor_authenticate_after', array('session' => $this->_getSession()));
         }
     }
     Mage::dispatchEvent('ced_csmarketplace_vendor_acl_check', array('current' => $this, 'action' => $action));
     return $this->_allowedResource;
 }
开发者ID:sixg,项目名称:mkAnagh,代码行数:45,代码来源:AbstractController.php

示例7: authenticate

 public function authenticate(Mage_Core_Controller_Varien_Action $action, $loginUrl = null)
 {
     if (!$this->isLoggedIn()) {
         $this->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_current' => true)));
         if (is_null($loginUrl)) {
             $loginUrl = Mage::getUrl('udropship/vendor/login');
         }
         $action->getResponse()->setRedirect($loginUrl);
         return false;
     }
     return true;
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:12,代码来源:Session.php


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