本文整理匯總了PHP中Magento\Framework\View\LayoutInterface::generateElements方法的典型用法代碼示例。如果您正苦於以下問題:PHP LayoutInterface::generateElements方法的具體用法?PHP LayoutInterface::generateElements怎麽用?PHP LayoutInterface::generateElements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\View\LayoutInterface
的用法示例。
在下文中一共展示了LayoutInterface::generateElements方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setUp
protected function setUp()
{
$this->markTestIncomplete('MAGETWO-6406');
parent::setUp();
$this->_setFixtureTheme();
$this->_layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Framework\\View\\LayoutInterface', ['area' => 'adminhtml']);
$this->_layout->getUpdate()->load('layout_test_grid_handle');
$this->_layout->generateXml();
$this->_layout->generateElements();
$this->_block = $this->_layout->getBlock('admin.test.grid.massaction');
}
示例2: setUp
protected function setUp()
{
$this->markTestIncomplete('MAGETWO-6406');
parent::setUp();
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
/** @var \Magento\Theme\Model\Theme\Registration $registration */
$registration = $objectManager->get('Magento\\Theme\\Model\\Theme\\Registration');
$registration->register();
$objectManager->get('Magento\\Framework\\View\\DesignInterface')->setDesignTheme('BackendTest/test_default');
$this->_layout = $objectManager->create('Magento\\Framework\\View\\LayoutInterface', ['area' => 'adminhtml']);
$this->_layout->getUpdate()->load('layout_test_grid_handle');
$this->_layout->generateXml();
$this->_layout->generateElements();
$this->_block = $this->_layout->getBlock('admin.test.grid.massaction');
$this->assertNotFalse($this->_block, 'Could not load the block for testing');
}
示例3: 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;
}
示例4: loadLayout
/**
* Load layout
*
* @return void
*/
public function loadLayout()
{
$this->layout->getUpdate()->load();
$this->layout->generateXml();
$this->layout->generateElements();
}