'', 'afterThumbnail' => '', 'beforeDelete' => '', 'afterDelete' => '', 'beforeElement' => '', 'afterElement' => '', ); public function render($content) { /** @var Qs_Form_Element_ExtendedImage $element */ $element = $this->getElement(); $view = $element->getView(); $content = Zend_Form_Decorator_File::render($content); $topHtml = ''; $resize = $element->getResize(); $resizeHtml = ''; if (!empty($resize)) { if (empty($resize['width'])) { $sizeNote = 'height is ' . $resize['height']; } elseif (empty($resize['height'])) { $sizeNote = 'width is ' . $resize['width']; } else { $sizeNote = 'Size is ' . $resize['width'] . 'x' . $resize['height']; } $resizeName = $element->getName() . '[resize]'; $resizeHtml = $view->formCheckbox($resizeName, Qs_Request::getRequestValue($resizeName, 'y'), null, array('checkedValue' => 'y', 'uncheckedValue' => 'n')) . ' '; $resizeHtml .= $view->formLabel($resizeName, 'Please resize the image automatically'); $resizeHtml = '
' . 'Preferred Image ' . $sizeNote . ' px
' . '
' . $resizeHtml . '
'; } if ($element->getValue()) { $topHtml = $this->_additionalHtml['beforeThumbnail'] . '' . $this->_additionalHtml['afterThumbnail'] . '' . $this->_additionalHtml['beforeDelete']; if (!$element->isRequired()) { if (empty($this->_additionalHtml['beforeDelete'])) { $topHtml .= '
'; } $topHtml .= ' ' . ''; } $topHtml .= $this->_additionalHtml['afterDelete'] . '
'; } else if (($thumbnail = $element->getDefaultThumbnail())) { $topHtml = $this->_additionalHtml['beforeThumbnail'] . '' . $this->_additionalHtml['afterThumbnail'] . '
'; } return $topHtml . $this->_additionalHtml['beforeElement'] . $content . $resizeHtml . $this->_additionalHtml['afterElement']; } }