/** * @return string */ public function __toString() { if ($this->open->bare) { return ''; } $tag = $this->presenter->renderClosingTag($this); if ($this->token) { $tag = '<input type="hidden" name="_token" value="' . $this->data->getToken() . '" />' . $tag; } return $tag; }
/** * @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); }
/** * @param ArrayAccess $model * @return $this */ public function model($model) { $this->dataStore->bind($model); return $this; }
/** * @return bool */ public function isSubmitted() { return $this->data->getOldValue('_form') == $this->name; }