_hasFilterByController = (bool) $value; return $this; } protected function _initColumns() { $this->addColumn('no', 'no'); $this->addColumn( 'date', 'added', [ 'title' => 'Date/Time', 'orderBy' => 'id', 'format' => constant('DATE_TIME_FORMAT') ] ); if ($this->_hasFilterByController) { $this->addColumn( 'text', 'controllerTitle', [ 'title' => 'Section', 'defaultText' => '-', ] ); } else { $this->addColumn( 'link_advanced', 'controllerTitle', [ 'title' => 'Section', 'url' => CURRENT_PAGE . '?controller=%s', 'urlParams' => ['controller'], 'defaultText' => '-', 'text' => '%s' ] ); } $this->addColumn('text', 'message'); return $this; } }