addColumn('date', 'added', array('title' => 'Date/Time', 'orderBy' => 'logAdded', 'format' => '%m/%d/%Y %I:%M %p')); if (!$this->_hasRole) { $this->addColumn( 'link_advanced', 'roleName', array( 'title' => 'Name', 'url' => $this->_getUrlExclude('roleId') . 'roleId=%d', 'urlParams' => array('roleId'), 'text' => '%s' ) ); } if (!$this->_hasApplication) { $this->addColumn( 'link_advanced', 'applicationTitle', array( 'title' => 'Section', 'url' => $this->_getUrlExclude('controller') . 'controller=%s', 'urlParams' => array('controller'), 'defaultText' => '-', 'text' => '%s' ) ); } $this->addColumn('text', 'message'); } protected function _getUrlExclude($field) { $url = Qs_Request::getUrlExclude($field, 'ipp', 'page'); $url .= parse_url($url, PHP_URL_QUERY) ? '&' : '?'; return $url; } public function setBaseUrl($url) { $this->_baseUrl = $url; return $this; } public function getBaseUrl() { return $this->_baseUrl; } public function setHasRole($hasRole) { $this->_hasRole = $hasRole; return $this; } public function getHasRole() { return $this->_hasRole; } public function setHasApplication($hasApplication) { $this->_hasApplication = $hasApplication; return $this; } public function getHasApplication() { return $this->_hasApplication; } public function getSessionUrl() { if (null === $this->sessionUrl) { $this->sessionUrl = $this->_getUrlExclude('sessionId'); } return $this->sessionUrl; } }