當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Context::getUrl方法代碼示例

本文整理匯總了PHP中Magento\Framework\App\Action\Context::getUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Context::getUrl方法的具體用法?PHP Context::getUrl怎麽用?PHP Context::getUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\App\Action\Context的用法示例。


在下文中一共展示了Context::getUrl方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * AjaxPlugin constructor.
  * @param Context $context
  * @param \Boxalino\Intelligence\Helper\Data $bxHelperData
  * @param \Boxalino\Intelligence\Helper\P13n\Adapter $p13nHelper
  * @param AutocompleteInterface $autocomplete
  * @param \Boxalino\Intelligence\Helper\Autocomplete $autocompleteHelper
  */
 public function __construct(Context $context, \Boxalino\Intelligence\Helper\Data $bxHelperData, \Boxalino\Intelligence\Helper\P13n\Adapter $p13nHelper, \Boxalino\Intelligence\Helper\Autocomplete $autocompleteHelper)
 {
     $this->autocompleteHelper = $autocompleteHelper;
     $this->url = $context->getUrl();
     $this->request = $context->getRequest();
     $this->p13nHelper = $p13nHelper;
     $this->resultFactory = $context->getResultFactory();
     $this->bxHelperData = $bxHelperData;
 }
開發者ID:boxalino,項目名稱:plugin-magento2,代碼行數:17,代碼來源:AjaxPlugin.php

示例2: __construct

 /**
  * @param PaymentHelper $paymentHelper
  */
 public function __construct(\Magento\Framework\App\Action\Context $context, PaymentHelper $paymentHelper, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\View\Asset\Repository $assetRepo)
 {
     $this->_request = $context->getRequest();
     $this->methodInstance = $paymentHelper->getMethodInstance($this->methodCode);
     $this->_checkoutSession = $checkoutSession;
     $this->_scopeConfig = $scopeConfig;
     $this->_urlBuilder = $context->getUrl();
     $this->_storeManager = $storeManager;
     $this->_assetRepo = $assetRepo;
 }
開發者ID:SummaSolutions,項目名稱:cart-magento2,代碼行數:13,代碼來源:CustomTicketConfigProvider.php

示例3: __construct

 /**
  * @param Context $context
  */
 public function __construct(Context $context)
 {
     parent::__construct($context->getRequest(), $context->getResponse());
     $this->_objectManager = $context->getObjectManager();
     $this->_eventManager = $context->getEventManager();
     $this->_url = $context->getUrl();
     $this->_actionFlag = $context->getActionFlag();
     $this->_redirect = $context->getRedirect();
     $this->_view = $context->getView();
     $this->messageManager = $context->getMessageManager();
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:Action.php

示例4: __construct

 /**
  * BxListProducts constructor.
  * @param Context $context
  * @param \Magento\Framework\Data\Helper\PostHelper $postDataHelper
  * @param \Magento\Catalog\Model\Layer\Resolver $layerResolver
  * @param CategoryRepositoryInterface $categoryRepository
  * @param \Magento\Framework\Url\Helper\Data $urlHelper
  * @param Data $bxHelperData
  * @param \Boxalino\Intelligence\Helper\P13n\Adapter $p13nHelper
  * @param \Magento\Framework\App\Action\Context $actionContext
  * @param \Magento\Framework\UrlFactory $urlFactory
  * @param \Magento\Catalog\Helper\Category $categoryHelper
  * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
  * @param \Magento\Catalog\Block\Category\View $categoryViewBlock
  * @param \Psr\Log\LoggerInterface $logger
  * @param array $data
  */
 public function __construct(\Magento\Catalog\Block\Product\Context $context, \Magento\Framework\Data\Helper\PostHelper $postDataHelper, \Magento\Catalog\Model\Layer\Resolver $layerResolver, CategoryRepositoryInterface $categoryRepository, \Magento\Framework\Url\Helper\Data $urlHelper, \Boxalino\Intelligence\Helper\Data $bxHelperData, \Boxalino\Intelligence\Helper\P13n\Adapter $p13nHelper, \Magento\Framework\App\Action\Context $actionContext, \Magento\Framework\UrlFactory $urlFactory, \Magento\Catalog\Helper\Category $categoryHelper, \Magento\Catalog\Model\CategoryFactory $categoryFactory, \Magento\Catalog\Block\Category\View $categoryViewBlock, \Psr\Log\LoggerInterface $logger, array $data = [])
 {
     $this->_logger = $logger;
     $this->_response = $actionContext->getResponse();
     $this->categoryViewBlock = $categoryViewBlock;
     $this->categoryFactory = $categoryFactory;
     $this->categoryHelper = $categoryHelper;
     $this->bxHelperData = $bxHelperData;
     $this->p13nHelper = $p13nHelper;
     $this->_url = $actionContext->getUrl();
     $this->_objectManager = $actionContext->getObjectManager();
     parent::__construct($context, $postDataHelper, $layerResolver, $categoryRepository, $urlHelper, $data);
 }
開發者ID:boxalino,項目名稱:plugin-magento2,代碼行數:30,代碼來源:BxListProducts.php


注:本文中的Magento\Framework\App\Action\Context::getUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。