コード例 #1
0
ファイル: Submit.php プロジェクト: spoonx/sxbootstrap
 /**
  * {@InheritDoc}
  */
 protected function initFormElement(ElementInterface $element)
 {
     $value = $element->getValue();
     if (!empty($value)) {
         $this->value($value);
     }
     return parent::initFormElement($element);
 }
コード例 #2
0
ファイル: Button.php プロジェクト: spoonx/sxbootstrap
 /**
  * {@InheritDoc}
  */
 protected function initFormElement(ElementInterface $element)
 {
     $value = $element->getValue();
     if (!empty($value)) {
         $this->addAttribute('value', $this->translate($value));
     }
     return parent::initFormElement($element);
 }