getElement(); $this->_initAppendPrepend(); $view = $element->getView(); if (null === $view) { throw new Zend_Form_Decorator_Exception('ViewHelper decorator cannot render without a registered view object'); } if (method_exists($element, 'getMultiOptions')) { $element->getMultiOptions(); } $helper = $this->getHelper(); $separator = $this->getSeparator(); $value = $this->getValue($element); $attribs = $this->getElementAttribs(); $name = $element->getFullyQualifiedName(); $id = $element->getId(); $attribs['id'] = $id; $elementContent = $view->$helper($name, $value, $attribs, $element->options); switch ($this->getPlacement()) { case self::APPEND: return $content . $separator . $this->getHtmlBeforeElement() . $elementContent . $this->getHtmlAfterElement(); case self::PREPEND: return $this->getHtmlBeforeElement() . $elementContent . $this->getHtmlAfterElement() . $separator . $content; default: return $this->getHtmlBeforeElement() . $elementContent . $this->getHtmlAfterElement(); } } }