/** * @return string */ public function renderOpeningTag(Open $open) { if (isset($this->style['form'])) { $open->addClass($this->style['form']); } return '<form' . $this->renderAttributes($open->attributes) . '>'; }
/** * @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); }
/** * Clone all elements */ public function __clone() { static::$copies++; $this->open = clone $this->open; $this->close = clone $this->close; foreach ($this->elements as $key => $element) { $this->elements[$key] = clone $element; if ($this->elements[$key] instanceof Element) { $this->elements[$key]->id($this->elements[$key]->attributes['id'] . '-copy-' . static::$copies); $this->elements[$key]->open = $this->open; } } $this->open->name($this->open->name . '-copy-' . static::$copies); }