getRestParams(); if (1 != count($params)) { $this->_do404(); } $this->_getDataObj()->setSessionId($params[0]); parent::exec(); } protected function _doList() { $this->_addNavigation(); $this->_addRoleInfo(); parent::_doList(); } protected function _getListOptions() { $options = parent::_getListOptions(); $options['hasFilterByController'] = (bool) $this->_getDataObj()->getFilter('controller'); return $options; } protected function _addRoleInfo() { $info = $this->_getDataObj()->getSessionInfo(); if ($info) { $options = [ 'role' => $info['role'], 'roleId' => $info['roleId'], 'doc' => $this->_doc, ]; (new RoleInfoView($options))->exec(); } } protected function _addNavigation() { $sessionInfo = $this->_getDataObj()->getSessionInfo(); $sessionsPage = Qs_SiteMap::findFirst(['fullAlias' => PARENT_PAGE_FINAL]); if ($sessionInfo && $sessionsPage) { Qs_Navigation::clean(); Qs_Navigation::add([ 'title' => $sessionsPage['header'], 'url' => $sessionsPage['url'] ]); $roleName = $this->_getDataObj()->getRoleTitle($sessionInfo['role'], $sessionInfo['roleId']); Qs_Navigation::add([ 'title' => 'Sessions of ' . $roleName, 'url' => $sessionsPage['url'] . '?roleId=' . $sessionInfo['roleId'] ]); $startDate = date(constant('DATE_TIME_FORMAT'), strtotime($sessionInfo['added'])); $closed = ''; if ('y' == $sessionInfo['closed']) { $endDate = $sessionInfo['closedAt']; $closed = ' [Closed]'; } else { $endDate = $sessionInfo['added']; } $endDate = date(constant('DATE_TIME_FORMAT'), strtotime($endDate)); Qs_Navigation::add(['title' => 'Session: ' . $startDate . ' - ' . $endDate . $closed, 'url' => '']); Qs_Navigation::enable(); } return $this; } protected function _getFilterFormOptions() { $options = parent::_getFilterFormOptions(); $options['role'] = $this->_getDataObj()->getSessionInfo('role'); return $options; } }