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