Exemplo n.º 1
0
 /**
  * @return bool
  * @throws Exception
  */
 public function isSubmitted()
 {
     if (!$this->open) {
         throw new Exception('Cannot call Form::isSubmitted() without calling Form::open() first.');
     }
     return $this->open->isSubmitted();
 }
Exemplo n.º 2
0
 /**
  * @return array|string
  */
 protected function getValue()
 {
     if (isset($this->forceValue)) {
         return $this->forceValue;
     }
     if ($this->open->isSubmitted()) {
         return $this->dataStore->getOldValue($this->name);
     }
     return isset($this->value) ? $this->value : $this->dataStore->getModelValue($this->name);
 }