public function getChildRoles($roleName)
    {
        $role = $this->getRole($roleName);

        if ($role === null) {
            throw new InvalidArgumentException("Role \"$roleName\" not found.");
        }

        $result = [];
        $this->getChildrenRecursive($roleName, $this->getChildrenList(), $result);

        $roles = [$roleName => $role];

        $roles += array_filter($this->getRoles(), function (Role $roleItem) use ($result) {
            return array_key_exists($roleItem->name, $result);
        });

        return $roles;
    }
public function getChildRoles($roleName)
    {
        $role = $this->getRole($roleName);

        if ($role === null) {
            throw new InvalidArgumentException("Role \"$roleName\" not found.");
        }

        $result = [];
        $this->getChildrenRecursive($roleName, $this->getChildrenList(), $result);

        $roles = [$roleName => $role];

        $roles += array_filter($this->getRoles(), function (Role $roleItem) use ($result) {
            return array_key_exists($roleItem->name, $result);
        });

        return $roles;
    }
public function getChildRoles ( $ roleName ) { $ role = $ this -> getRole ( $ roleName ) ; if ( $ role === null ) { throw new InvalidArgumentException ( "Role \"$roleName\" not found." ) ; } $ result = [ ] ; $ this -> getChildrenRecursive ( $ roleName , $ this -> getChildrenList ( ) , $ result ) ; $ roles = [ $ roleName => $ role ] ; $ roles += array_filter ( $ this -> getRoles ( ) , function ( Role $ roleItem ) use ( $ result ) { return array_key_exists ( $ roleItem -> name , $ result ) ; } ) ; return $ roles ; }
{@inheritdoc}
{