本文整理汇总了PHP中Mage_Core_Controller_Varien_Action::loadLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Controller_Varien_Action::loadLayout方法的具体用法?PHP Mage_Core_Controller_Varien_Action::loadLayout怎么用?PHP Mage_Core_Controller_Varien_Action::loadLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Controller_Varien_Action
的用法示例。
在下文中一共展示了Mage_Core_Controller_Varien_Action::loadLayout方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRenderLayout
/**
* @magentoAppIsolation enabled
*/
public function testRenderLayout()
{
$this->_model->loadLayout();
$this->assertEmpty($this->_model->getResponse()->getBody());
$this->_model->renderLayout();
$this->assertNotEmpty($this->_model->getResponse()->getBody());
}
示例2: loadLayout
public function loadLayout($ids = null, $generateBlocks = true, $generateXml = true)
{
parent::loadLayout($ids, $generateBlocks, $generateXml);
$this->_initLayoutMessages('adminhtml/session');
return $this;
}
示例3: _getMinicartHtml
/**
* Retrieve the minicart_head block's html
* @param Mage_Core_Controller_Varien_Action $controllerAction the request's controller
* @return string
*/
protected function _getMinicartHtml($controllerAction)
{
$controllerAction->loadLayout();
$sidebar = $controllerAction->getLayout()->getBlock('minicart_head');
if ($sidebar) {
$sidebarHtml = Mage::getSingleton('core/url')->sessionUrlVar($sidebar->toHtml());
return '<div class="header-minicart minicart--fixed">' . $sidebarHtml . '</div>';
}
return '';
}
示例4: loadLayout
/**
* Load layout by handles and verify user ACL
*
* @param string|null|bool|array $ids
* @param bool $generateBlocks
* @param bool $generateXml
* @return Mage_Backend_Controller_ActionAbstract|Mage_Core_Controller_Varien_Action
*/
public function loadLayout($ids = null, $generateBlocks = true, $generateXml = true)
{
parent::loadLayout($ids, false, $generateXml);
Mage::getSingleton('Mage_Core_Model_Authorization')->filterAclNodes($this->getLayout()->getNode());
if ($generateBlocks) {
$this->generateLayoutBlocks();
$this->_isLayoutLoaded = true;
}
$this->_initLayoutMessages('Mage_Backend_Model_Session');
return $this;
}
示例5: _getMinicartHtml
/**
* Retrieve the minicart_head block's html
* @param Mage_Core_Controller_Varien_Action $controllerAction the request's controller
* @return string
*/
protected function _getMinicartHtml($controllerAction)
{
$controllerAction->loadLayout();
$sidebar = $controllerAction->getLayout()->getBlock('minicart_head')->toHtml();
return '<div class="header-minicart minicart--fixed">' . $sidebar . '</div>';
}
示例6: prepareAndRenderView
/**
* @param Open_Gallery_Model_Item $item
* @param Mage_Core_Controller_Varien_Action $controller
* @return Open_Gallery_Helper_Item_Interface|void
*/
public function prepareAndRenderView(Open_Gallery_Model_Item $item, Mage_Core_Controller_Varien_Action $controller)
{
$controller->loadLayout(array('default', strtolower($controller->getFullActionName() . '_' . $item->getData('type'))));
$controller->renderLayout();
return $this;
}