Пример #1
0
 public function _construct()
 {
     parent::_construct();
     $action = $this->routeHandler();
     if ($action) {
         $this->addBodyClass($action);
     }
 }
Пример #2
0
 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();
 }
Пример #3
0
 /**
  * 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();
     }
 }
Пример #4
0
 /**
  * Get tags array for saving cache.
  *
  * @return array
  */
 public function getCacheTags()
 {
     if (Auth::check()) {
         $this->addModelTags(Auth::user());
     }
     return parent::getCacheTags();
 }