public function getManipulatableRoles(array $currentUser)
    {
        $manipulatableRoles = [];

        foreach ($this->getDefinedRoles() as $roleName => $role) {
            if ($this->checkPermission($currentUser['roles'], 'manipulate', 'roles-hierarchy', $roleName)) {
                $manipulatableRoles[] = $roleName;
            }
        }

        return $manipulatableRoles;
    }
public function getManipulatableRoles(array $currentUser)
    {
        $manipulatableRoles = [];

        foreach ($this->getDefinedRoles() as $roleName => $role) {
            if ($this->checkPermission($currentUser['roles'], 'manipulate', 'roles-hierarchy', $roleName)) {
                $manipulatableRoles[] = $roleName;
            }
        }

        return $manipulatableRoles;
    }
public function getManipulatableRoles ( array $ currentUser ) { $ manipulatableRoles = [ ] ; foreach ( $ this -> getDefinedRoles ( ) as $ roleName => $ role ) { if ( $ this -> checkPermission ( $ currentUser [ 'roles' ] , 'manipulate' , 'roles-hierarchy' , $ roleName ) ) { $ manipulatableRoles [ ] = $ roleName ; } } return $ manipulatableRoles ; }
Gets the roles the current user can manipulate.

@param array $currentUser

@return string[] list of role names
Gets the roles the current user can manipulate .