cols = $colAmount; return $this; } /** * How many rows the field should have. * * @param int $rowAmount * @return $this */ public function rows(int $rowAmount): self { $this->rows = $rowAmount; return $this; } /** * Which way to wrap text in the TextArea. * * Can be TextAreaField::WRAP_HARD or TextAreaField::WRAP_SOFT. * * @param int $wrapType * @return $this */ public function wrap(int $wrapType): self { $this->wrap = $wrapType; return $this; } /** * @inheritDoc */ public function generateHtml(): string { $id = "id='".$this->getId()."'"; $name = "name='".$this->getName()."'"; $lock = $this->lock ? "disabled" : ""; $placeholder = !is_null($this->placeholder) ? "placeholder='".$this->placeholder."'" : ""; $maxLength = $this->maxLength > 0 ? "maxlength='".$this->maxLength."'" : ""; $minLength = $this->minLength > 0 ? "minlength='".$this->minLength."'" : ""; $rows = $this->rows > 0 ? "rows='".$this->rows."'" : ""; $cols = $this->cols > 0 ? "cols='".$this->cols."'" : ""; $wrap = $this->wrap == self::WRAP_HARD ? "wrap='hard'" : "wrap='soft'"; $class = "class='".implode(" ", $this->classNames)."'"; return ""; } }