/** * 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(); }
/** * Prepare search grid * * @return $this */ protected function _beforeToHtml() { $this->getChildBlock('grid')->setIndex($this->getIndex())->setFirstShow($this->getFirstShow()); return parent::_beforeToHtml(); }
/** * Initialize grid before rendering * * @return $this */ protected function _beforeToHtml() { $this->_prepareGrid(); return parent::_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(); }
/** * This method is called before rendering HTML * * @return $this */ protected function _beforeToHtml() { $this->_prepareForm(); $this->_initFormValues(); return parent::_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(); }