public function getValue($raw = false)
 {
     $value = parent::getValue();
     if (!$raw) {
         $value = \Zend\Json\Json::decode($value);
     }
     return $value;
 }
Beispiel #2
0
 /**
  * @param ButtonElement $element
  */
 protected function initFormElement(ButtonElement $element)
 {
     $this->getElement()->addAttributes($element->getAttributes());
     $value = $element->getValue();
     $label = $element->getLabel();
     if (!empty($label)) {
         $this->setLabel($label);
     }
     if (!empty($value)) {
         $this->addAttribute('value', $value);
     }
 }