本文整理汇总了PHP中Magento\Backend\Block\Widget::_beforeToHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Widget::_beforeToHtml方法的具体用法?PHP Widget::_beforeToHtml怎么用?PHP Widget::_beforeToHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Backend\Block\Widget
的用法示例。
在下文中一共展示了Widget::_beforeToHtml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _beforeToHtml
/**
* Before rendering html, but after trying to load cache
*
* @return void
*/
protected function _beforeToHtml()
{
if ($this->getParentBlock() && ($order = $this->getOrder())) {
$this->setEntity($order);
}
parent::_beforeToHtml();
}
示例2: _beforeToHtml
/**
* Prepare search grid
*
* @return $this
*/
protected function _beforeToHtml()
{
$this->getChildBlock('grid')->setIndex($this->getIndex())->setFirstShow($this->getFirstShow());
return parent::_beforeToHtml();
}
示例3: _beforeToHtml
/**
* Initialize grid before rendering
*
* @return $this
*/
protected function _beforeToHtml()
{
$this->_prepareGrid();
return parent::_beforeToHtml();
}
示例4: _beforeToHtml
/**
* Collect, sort and set template options
*
* @return $this
*/
protected function _beforeToHtml()
{
$groupedOptions = [];
foreach ($this->_getDefaultTemplatesAsOptionsArray() as $option) {
$groupedOptions[$option['group']][] = $option;
}
ksort($groupedOptions);
$this->setData('template_options', $groupedOptions);
return parent::_beforeToHtml();
}
示例5: _beforeToHtml
/**
* This method is called before rendering HTML
*
* @return $this
*/
protected function _beforeToHtml()
{
$this->_prepareForm();
$this->_initFormValues();
return parent::_beforeToHtml();
}
示例6: _beforeToHtml
/**
* {@inheritdoc}
*/
protected function _beforeToHtml()
{
if ($activeTab = $this->getRequest()->getParam('active_tab')) {
$this->setActiveTab($activeTab);
} elseif ($activeTabId = $this->_authSession->getActiveTabId()) {
$this->_setActiveTab($activeTabId);
}
$_new = [];
foreach ($this->_tabs as $key => $tab) {
foreach ($this->_tabs as $k => $t) {
if ($t->getAfter() == $key) {
$_new[$key] = $tab;
$_new[$k] = $t;
} else {
if (!$tab->getAfter() || !in_array($tab->getAfter(), array_keys($this->_tabs))) {
$_new[$key] = $tab;
}
}
}
}
$this->_tabs = $_new;
unset($_new);
$this->assign('tabs', $this->_tabs);
return parent::_beforeToHtml();
}