public getRoleParents ( $role ) : array | ||
return | array |
public function getRoleParents($role)
{
$this->checkRole($role);
return array_keys($this->roles[$role]['parents']);
}
/** * 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); }