61 parent::setDefaults();
63 $this->defaults[
'rows'] =
null;
64 $this->defaults[
'cols'] =
null;
65 $this->defaults[
'autogrow'] =
false;
75 $label = $this->htmlLabel();
85 return "<p {$wrapperAttributes}>" .
87 "<span class=\"depage-label\">{$label}{$marker}</span>" .
88 "<textarea name=\"{$this->name}\"{$inputAttributes}{$rows}{$cols}>{$value}</textarea>" .
103 $this->dataAttr[
'textarea-options'] = json_encode($options);
105 return parent::htmlDataAttributes();
115 return ($this->rows ===
null) ?
"" :
" rows=\"" . $this->
htmlEscape($this->rows) .
"\"";
124 return ($this->cols ===
null) ?
"" :
" cols=\"" . $this->
htmlEscape($this->cols) .
"\"";
htmlEscape($options=array())
Escapes HTML in strings and arrays of strings.
$value
Input elements's value.
$label
Input element - HTML label.
$errorMessage
Message that gets displayed in case of invalid input.
htmlHelpMessage()
Returns HTML-rendered helpMessage.
htmlWrapperAttributes()
Returns string of HTML attributes for element wrapper paragraph.
htmlMarker()
Returns elements' required-indicator.
$helpMessage
Extra help message.
htmlValue()
Returns HTML-rendered element value.
$marker
Input element - HTML marker text that marks required fields.
htmlErrorMessage()
Returns HTML-rendered error message.
htmlInputAttributes()
renders text element specific HTML attributes
htmlCols()
Renders HTML cols attribute.
$autogrow
wether to autogrow textarea or not
htmlDataAttributes()
Returns dataAttr escaped as attribute string.
htmlRows()
Renders HTML rows attribute.
__toString()
Renders element to HTML.
$cols
HTML cols attribute.
setDefaults()
collects initial values across subclasses
$rows
HTML rows attribute.
Classes for HTML input-elements.