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