getUrlVariableValues(array('leadership')); if (!empty($urlVariables['leadership'])) { $this->defaultOrderBy = App_User_Admin_Obj::SORTER_LEADERSHIP; $this->_hasSorter = true; } return parent::_init(); } protected function _initColumns() { if ($this->_hasSorter) { $this->addColumn('no', 'no', array('orderBy' => 'leadershipSorter')); } $this->addColumn('text', 'memberId', array('title' => 'ID', 'orderBy' => 'memberId')); $this->addColumn('text', 'name', array('orderBy' => 'lastName')); $this->addColumn('leadership', 'leadership', array('title' => 'Leadership Group', 'orderBy' => 'groupId')); $this->addColumn('text', 'company', array('title' => 'Company', 'orderBy' => 'company')); $this->addColumn('job_link', 'jobAmount', array('title' => 'Jobs Posted', 'orderBy' => 'jobAmount')); $this->addColumn( 'link_enum', 'active', array('title' => 'Status', 'orderBy' => 'active', 'values' => array('y' => 'Active', 'n' => 'Inactive')) ); $this->addOptionsColumn(); return $this; } public function addOptionsColumn() { $options = array( 'actions' => array( 'addToEvent' => array( 'title' => 'Add to Event', 'formattedLink' => \App\Event\Admin\View::getPage('url') . '?action=newAttendee&userId=%d' ), 'edit' => array(), 'delete' => array(), ) ); if (($logBaseUrl = Qs_SiteMap::findFirst(null, array('type' => 'ViewControllerLog_Admin_'), null, 'url'))) { $options['actions']['viewLog'] = array( 'formattedLink' => $logBaseUrl . '/user?roleId=%d', 'linkTitle' => "View this " . $this->getConfig('itemName') . "'s Log" ); } $this->addColumn('options', 'options', $options); return $this; } }