/**
  * Translate legend if possible.
  *
  * This is done, so the translation in fieldset decorator can be disabled. It won't check if translation is
  * possible and therefore create log messages. Unfortunately some of our legends cannot be translated.
  *
  * @param string $legend
  * @return void|Zend_Form
  */
 public function setLegend($legend)
 {
     $translator = $this->getTranslator();
     if (!is_null($translator) && $translator->isTranslated($legend)) {
         parent::setLegend($translator->translate($legend));
     } else {
         parent::setLegend($legend);
     }
 }
Example #2
0
 /**
  * Bereitet das Formular fuer die Anzeige als View vor.
  */
 public function prepareRenderingAsView()
 {
     parent::prepareRenderingAsView();
     $this->removeDecorator('Form');
     $this->removeDisplayGroup('actions');
     $modelIdElement = $this->getElement(self::ELEMENT_MODEL_ID);
     if (!is_null($modelIdElement)) {
         $modelIdElement->removeDecorator('liWrapper');
     }
 }
Example #3
0
 /**
  * Bereitet das Formular fuer die Anzeige als View vor.
  */
 public function prepareRenderingAsView()
 {
     parent::prepareRenderingAsView();
     $this->removeDecorator('Form');
     $this->removeDisplayGroup('actions');
 }