getElement(); $view = $element->getView(); if($view == null) return $content; $errors = array(); foreach($element->getElements() as $el) $errors = array_merge($errors, $el->getMessages()); if(count($errors) == 0) return $content; $separator = $this->getSeparator(); $placement = $this->getPlacement(); $errors = $view->formErrors($errors, $this->getOptions()); switch ($placement) { case self::APPEND: return $content . $separator . $errors; case self::PREPEND: return $errors . $separator . $content; } } }