addColumn('no', 'no') ->addColumn('text', 'firstName', ['orderBy' => 'firstName']) ->addColumn('text', 'lastName', ['orderBy' => 'lastName']) ->addColumn('text', 'login', ['orderBy' => 'login']) ->addColumn('email', 'email', ['orderBy' => 'email', 'defaultText' => '-']) ->addOptionsColumn(); return $this; } public function addOptionsColumn() { $options = [ 'actions' => [ 'edit' => [], 'delete' => [], ], ]; if (($logBaseUrl = Qs_SiteMap::findFirst(null, ['type' => 'ViewControllerLog_Admin_'], null, 'url'))) { $options['actions']['viewLog'] = [ 'formattedLink' => $logBaseUrl . '/admin?roleId=%d', 'linkTitle' => "View this Administrator's Log", ]; } $this->addColumn('options', 'options', $options); return $this; } }