/** * Recursivelly returns current and all parent roles * @param type $role * @return type */ public function getEffectiveRoles($role) { $roles = array($role => TRUE); foreach ($this->acl->getRoleParents($role) as $parent) { $roles += array_flip($this->getEffectiveRoles($parent)); } return array_keys($roles); }
public function getRoles($role) { $roles = array_merge(array($role), $this->acl->getRoleParents($role)); return $roles; }