Ejemplo n.º 1
0
 /**
  * vraci svou hodnotu zadanou uzivatelem (napriklad post data)
  * @return string
  */
 public function getValue()
 {
     try {
         if ($this->value) {
             return $this->value;
         }
         if ($this->getForm()->wasSent()) {
             if ($this->isDisabled()) {
                 $this->value = $this->getDefault();
             } else {
                 $this->value = $this->form->getSentDataByControlName($this->getName());
             }
         } else {
             if ($this->form->isSubForm()) {
                 $dataMyStep = $this->form->getFormMultistep()->getFormsDataStepByForm($this->form);
                 $this->value = $dataMyStep[$this->getName()] ? $dataMyStep[$this->getName()] : $this->getDefault();
             } else {
                 $this->value = $this->getDefault();
             }
         }
         return $this->value;
     } catch (Exception $e) {
         throw $e;
     }
 }