public function _construct() { parent::_construct(); $action = $this->routeHandler(); if ($action) { $this->addBodyClass($action); } }
protected function _toHtml() { if (is_array($this->_crumbs)) { reset($this->_crumbs); $this->_crumbs[key($this->_crumbs)]['first'] = true; end($this->_crumbs); $this->_crumbs[key($this->_crumbs)]['last'] = true; } $this->assign('crumbs', $this->_crumbs); return parent::_toHtml(); }
/** * Make sure specified block will be registered in the specified child groups. * * @param string $groupName * @param \Layout\Block $child */ public function addToChildGroup($groupName, \Layout\Block $child) { if (!isset($this->_childGroups[$groupName])) { $this->_childGroups[$groupName] = []; } if (!in_array($child->getBlockAlias(), $this->_childGroups[$groupName])) { $this->_childGroups[$groupName][] = $child->getBlockAlias(); } }
/** * Get tags array for saving cache. * * @return array */ public function getCacheTags() { if (Auth::check()) { $this->addModelTags(Auth::user()); } return parent::getCacheTags(); }