public function setGroupView(string $view, string $group = 'default'): FormInterface
    {
        // Verify that the form has the mentioned group.
        // If not, throw an error.
        if (! $this->repository()->hasGroup($group)) {
            throw new DomainException('You cannot change the view of an undefined form group.');
        }

        $this->repository()->getGroup($group)->setView($view);

        return $this;
    }