public function contactAction() { $name = $this->_getParam('name'); $ctRow = $this->userService->GetContactTypeByName($name); if ($ctRow != null) { $this->view->contactType = $ctRow; } else { $this->view->contactType = $this->view->contactTypes->current(); } $this->view->users = $this->view->contactType->findDependentRowset('UsersTable'); }