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


PHP Http::getFullActionName方法代碼示例

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


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

示例1: execute

 /**
  * @param $observer
  * @return $this
  */
 public function execute(EventObserver $observer)
 {
     $menu = $observer->getMenu();
     $tree = $menu->getTree();
     $fullAction = $this->request->getFullActionName();
     $selectedActions = ['gemtoo_blog_article_index', 'gemtoo_blog_article_view'];
     $articleNodeId = 'articles';
     $data = ['name' => __('Blog'), 'id' => $articleNodeId, 'url' => $this->articleUrl->getListUrl(), 'is_active' => in_array($fullAction, $selectedActions)];
     $articlesNode = new Node($data, 'id', $tree, $menu);
     $menu->addChild($articlesNode);
     return $this;
 }
開發者ID:pleminh,項目名稱:Gemtoo,代碼行數:16,代碼來源:TopMenu.php

示例2: testGetFullActionName

 public function testGetFullActionName()
 {
     $this->_model = $this->getModel();
     /* empty request */
     $this->assertEquals('__', $this->_model->getFullActionName());
     $this->_model->setRouteName('test')->setControllerName('controller')->setActionName('action');
     $this->assertEquals('test/controller/action', $this->_model->getFullActionName('/'));
 }
開發者ID:IlyaGluschenko,項目名稱:test001,代碼行數:8,代碼來源:HttpTest.php

示例3: testGetFullActionName

 public function testGetFullActionName()
 {
     $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock);
     /* empty request */
     $this->assertEquals('__', $this->_model->getFullActionName());
     $this->_model->setRouteName('test')->setControllerName('controller')->setActionName('action');
     $this->assertEquals('test/controller/action', $this->_model->getFullActionName('/'));
 }
開發者ID:Atlis,項目名稱:docker-magento2,代碼行數:8,代碼來源:HttpTest.php

示例4: renderResult

 /**
  * Render current layout
  *
  * @param ResponseInterface $response
  * @return $this
  */
 public function renderResult(ResponseInterface $response)
 {
     \Magento\Framework\Profiler::start('LAYOUT');
     \Magento\Framework\Profiler::start('layout_render');
     $this->applyHttpHeaders($response);
     $this->render($response);
     $this->eventManager->dispatch('layout_render_before');
     $this->eventManager->dispatch('layout_render_before_' . $this->request->getFullActionName());
     \Magento\Framework\Profiler::stop('layout_render');
     \Magento\Framework\Profiler::stop('LAYOUT');
     return $this;
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:18,代碼來源:Layout.php

示例5: generateLayoutBlocks

 /**
  * Generate layout blocks
  *
  * @return $this
  */
 protected function generateLayoutBlocks()
 {
     $this->beforeGenerateBlock();
     Profiler::start('LAYOUT');
     /* dispatch event for adding xml layout elements */
     $this->eventManager->dispatch('layout_generate_blocks_before', ['full_action_name' => $this->request->getFullActionName(), 'layout' => $this->layout]);
     Profiler::start('layout_generate_blocks');
     /* generate blocks from xml layout */
     $this->layout->generateElements();
     Profiler::stop('layout_generate_blocks');
     $this->eventManager->dispatch('layout_generate_blocks_after', ['full_action_name' => $this->request->getFullActionName(), 'layout' => $this->layout]);
     Profiler::stop('LAYOUT');
     $this->afterGenerateBlock();
     return $this;
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:20,代碼來源:Builder.php


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