public function setPlatformRoles(User $user, $roles)
    {
        $this->roleManager->resetRoles($user);
        $this->roleManager->associateRoles($user, $roles);
    }
public function setPlatformRoles(User $user, $roles)
    {
        $this->roleManager->resetRoles($user);
        $this->roleManager->associateRoles($user, $roles);
    }
public function setPlatformRoles ( User $ user , $ roles ) { $ this -> roleManager -> resetRoles ( $ user ) ; $ this -> roleManager -> associateRoles ( $ user , $ roles ) ; }
Sets an array of platform role to a user.

@todo use crud instead
@todo REMOVE ME

@param User   $user
@param Role[] $roles
Sets an array of platform role to a user .