/** * Return whether the form has errors or not. * * @return bool */ public function hasFormErrors() { $errors = $this->form->getErrors(); return !$errors->isEmpty(); }