field = $field; } public function setPlaceholder(string $placeholder): self { $this->placeholder = $placeholder; return $this; } public function setWidth(int $width): self { $this->width = $width; return $this; } public function getView(): CTextBox { $view = (new CTextBox($this->field->getName(), $this->field->getValue(), false, $this->field->getMaxLength())) ->setWidth($this->width) ->setAriaRequired($this->isRequired()) ->setEnabled(!$this->isDisabled()); if ($this->placeholder !== '') { $view->setAttribute('placeholder', $this->placeholder); } return $view; } }