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


PHP Layout::getUpdate方法代碼示例

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


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

示例1: testGetUpdate

 public function testGetUpdate()
 {
     $themeMock = $this->getMockForAbstractClass('Magento\\Framework\\View\\Design\\ThemeInterface');
     $this->themeResolverMock->expects($this->once())->method('get')->will($this->returnValue($themeMock));
     $this->processorFactoryMock->expects($this->once())->method('create')->with(['theme' => $themeMock])->will($this->returnValue($this->processorMock));
     $this->assertEquals($this->processorMock, $this->model->getUpdate());
     $this->assertEquals($this->processorMock, $this->model->getUpdate());
 }
開發者ID:ViniciusAugusto,項目名稱:magento2,代碼行數:8,代碼來源:LayoutTest.php

示例2: _wrapEsi

 /**
  * Replace the output of the block, containing ttl attribute, with ESI tag
  *
  * @param \Magento\Framework\View\Element\AbstractBlock $block
  * @param \Magento\Framework\View\Layout $layout
  * @return string
  */
 protected function _wrapEsi(\Magento\Framework\View\Element\AbstractBlock $block, \Magento\Framework\View\Layout $layout)
 {
     $url = $block->getUrl('page_cache/block/esi', ['blocks' => json_encode([$block->getNameInLayout()]), 'handles' => json_encode($layout->getUpdate()->getHandles())]);
     // Varnish does not support ESI over HTTPS must change to HTTP
     $url = substr($url, 0, 5) === 'https' ? 'http' . substr($url, 5) : $url;
     return sprintf('<esi:include src="%s" />', $url);
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:14,代碼來源:ProcessLayoutRenderElement.php

示例3: getUpdate

 /**
  * {@inheritdoc}
  */
 public function getUpdate()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getUpdate');
     if (!$pluginInfo) {
         return parent::getUpdate();
     } else {
         return $this->___callPlugins('getUpdate', func_get_args(), $pluginInfo);
     }
 }
開發者ID:HaonanXu,項目名稱:der-snack-backup,代碼行數:12,代碼來源:Interceptor.php

示例4: _wrapEsi

 /**
  * Replace the output of the block, containing ttl attribute, with ESI tag
  *
  * @param \Magento\Framework\View\Element\AbstractBlock $block
  * @param \Magento\Framework\View\Layout $layout
  * @return string
  */
 protected function _wrapEsi(\Magento\Framework\View\Element\AbstractBlock $block, \Magento\Framework\View\Layout $layout)
 {
     $url = $block->getUrl('page_cache/block/esi', ['blocks' => json_encode([$block->getNameInLayout()]), 'handles' => json_encode($layout->getUpdate()->getHandles())]);
     return sprintf('<esi:include src="%s" />', $url);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:12,代碼來源:ProcessLayoutRenderElement.php

示例5: testGetUpdate

 public function testGetUpdate()
 {
     $this->assertInstanceOf('Magento\\Framework\\View\\Layout\\ProcessorInterface', $this->_layout->getUpdate());
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:4,代碼來源:LayoutTest.php


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