getRestParams(); if ($params) { if (count($params) > 1) { $this->_do404(); } $this->_getDataObj()->setPrimaryKeyByAlias($params[0]); $this->setDefaultAction('view'); } return parent::exec(); } protected function _prepareViewItem(array &$item) { $item['title'] = $item['firstName'] . ' ' . $item['lastName']; $item['config'] = $this->getConfig()->toArray(); $item['config']['itemName'] = 'Member Directory'; return parent::_prepareViewItem($item); } protected function _initDetailsPage(array $item) { Qs_Navigation::append(['title' => $item['title']]); return parent::_initDetailsPage($item); } protected function getData() { return $this->_getDataObj()->getDataForView(); } protected function _isItemAccessible(array $item) { return parent::_isItemAccessible($item) && Entity::STATUS_ACTIVE == $item['status']; } public static function getViewUrl($id = null) { $url = static::getPage('url'); if ($id) { return $url . '/' . $id; } return $url . '/%s'; } }