Exemple #1
0
 /**
  * {@InheritDoc}
  */
 protected function initFormElement(ElementInterface $element)
 {
     $value = $element->getValue();
     if (!empty($value)) {
         $this->addAttribute('value', $this->translate($value));
     }
     return parent::initFormElement($element);
 }
Exemple #2
0
 /**
  * {@InheritDoc}
  */
 public function value($value)
 {
     return parent::value($this->translate($value));
 }