public function countUserErrors() { $count = 0; if ($this->countErrors()) { foreach ($this->getErrors() as $error) { if ($error->isUserError()) { $count++; } } } return $count; }