/** * Handle the command. */ public function handle() { /* @var UserInterface $user */ $user = $this->builder->getFormEntry(); foreach ($this->builder->getRoles() as $role) { if ($role = $this->dispatch(new GetRole($role))) { $user->attachRole($role); } } }