public function listAction() { if ($this->_isUserAllowed(User_Module_Acl::ACL_RESOURCE_USERROLE, User_Module_Acl::ACL_RESOURCE_USERROLE_PRIVILEGE_CREATE)) { if ($this->_hasParam('id')) { $roleDomain = new User_Domain_Role(null); $role = $roleDomain->getById($this->_getParam('id')); if ($role) { $this->view->role = $role; $this->view->modulesResources = Agana_Acl_Service::getResources(); } else { $this->_helper->flashMessenger->addMessage(array('error' => 'Could not found any role with this id')); return; } //$this->view->roles = $roleDomain->getAll(Zend_Auth::getInstance()->getIdentity()->appaccount_id); } else { $this->_helper->flashMessenger->addMessage(array('error' => 'Param id missing')); return; } } }
public function getRole() { if ($this->acl_role_id && $this->role == null) { $roleDomain = new User_Domain_Role(); $this->role = $roleDomain->getById($this->acl_role_id); } if (!is_a($this->role, 'User_Model_Role')) { $this->role = new \User_Model_Role(); } return $this->role; }