Textarea extends Element
in package
Uses AttributesEventsTraits, AttributeIdTrait, AttributeClassTrait, AttributeValueTrait, AttributeRequiredTrait, AttributeDisabledTrait, AttributePlaceholderTrait, AttributeAutofocusTrait, AttributeMaxlengthTrait, AttributeReadonlyTrait, AttributeFormTrait, AttributeRegexTrait, LabelTrait

This is the Textarea class.

This class represents a 'textarea' element.
This class extends Element (FWK\Core\Form\Elements\Element), see this class.

Tags
see
Textarea::setContentText()
see
Textarea::getContentText()
see
Textarea::setCol()
see
Textarea::getCol()
see
Textarea::setDirname()
see
Textarea::getDirname()
see
Textarea::setRows()
see
Textarea::getRows()
see
Textarea::setWrap()
see
Textarea::getWrap()
see
Textarea::outputElement()
see
Element

Table of Contents

TYPE  = 'textarea'
WRAP_HARD  = 'hard'
WRAP_SOFT  = 'soft'
$attributeWildcard  : string
$autofocus  : bool
$class  : string
$classRichFormFactory  : string|null
$col  : int
$dirname  : string
$disabled  : bool
$elements  : mixed
$elementsClass  : array<string|int, mixed>
$form  : string
$id  : string
$label  : string
$maxlength  : int
$onclick  : string
$oncopy  : string
$oncut  : string
$ondblclick  : string
$ondrag  : string
$ondragend  : string
$ondragenter  : string
$ondragleave  : string
$ondragover  : string
$ondragstart  : string
$ondrop  : string
$onkeydown  : string
$onkeypress  : string
$onkeyup  : string
$onmousedown  : string
$onmousemove  : string
$onmouseout  : string
$onmouseover  : string
$onmouseup  : string
$onmousewheel  : string
$onpaste  : string
$onscroll  : string
$onwheel  : string
$placeholder  : string
$readonly  : bool
$regex  : string
$required  : bool
$rows  : int
$text  : string
$value  : string
$wrap  : string
__construct() Constructor. It creates the Textarea with the given value.  : mixed
getAttributeWildcard() This method returns the current value of the 'wildcard' attribute.  : string
getAutofocus() This method returns the current value of the 'autofocus' attribute.  : bool
getClass() This method returns the current value of the 'class' attribute.  : string
getCol() This method returns the 'cols' textarea attribute.  : int
getContentText() This method returns the 'text' of the textarea.  : string
getDirname() This method returns the 'dirname' textarea attribute.  : string
getDisabled() This method returns the current value of the 'disabled' attribute.  : bool
getFilterInput() This method returns the FilterInput of the Element.  : FilterInput|null
getForm() This method returns the current value of the 'form' attribute.  : string
getId() This method returns the current value of the 'id' attribute.  : string
getLabelFor() This method returns the label tag output.  : string
getMaxlength() This method returns the current value of the 'maxLength' attribute.  : int
getOnclick() This method returns the current value of the 'onclick' event attribute.  : string
getOncopy() This method returns the current value of the 'oncopy' event attribute.  : string
getOncut() This method returns the current value of the 'oncut' event attribute.  : string
getOndblclick() This method returns the current value of the 'ondblclick' event attribute.  : string
getOndrag() This method returns the current value of the 'ondrag' event attribute.  : string
getOndragend() This method returns the current value of the 'ondragend' event attribute.  : string
getOndragenter() This method returns the current value of the 'ondragenter' event attribute.  : string
getOndragleave() This method returns the current value of the 'ondragleave' event attribute.  : string
getOndragover() This method returns the current value of the 'ondragover' event attribute.  : string
getOndragstart() This method returns the current value of the 'ondragstart' event attribute.  : string
getOndrop() This method returns the current value of the 'ondrop' event attribute.  : string
getOnkeydown() This method returns the current value of the 'onkeydown' event attribute.  : string
getOnkeypress() This method returns the current value of the 'onkeypress' event attribute.  : string
getOnkeyup() This method returns the current value of the 'onkeyup' event attribute.  : string
getOnmousedown() This method returns the current value of the 'onmousedown' event attribute.  : string
getOnmousemove() This method returns the current value of the 'onmousemove' event attribute.  : string
getOnmouseout() This method returns the current value of the 'onmouseout' event attribute.  : string
getOnmouseover() This method returns the current value of the 'onmouseover' event attribute.  : string
getOnmouseup() This method returns the current value of the 'onmouseup' event attribute.  : string
getOnmousewheel() This method returns the current value of the 'onmousewheel' event attribute.  : string
getOnpaste() This method returns the current value of the 'onpaste' event attribute.  : string
getOnscroll() This method returns the current value of the 'onscroll' event attribute.  : string
getOnwheel() This method returns the current value of the 'onwheel' event attribute.  : string
getPlaceholder() This method returns the current value of the 'placeholder' attribute.  : string
getReadonly() This method returns the current value of the 'readonly' attribute.  : bool
getRegex() This method returns the current regex of the 'regex' attribute.  : string
getRequired() This method returns the current value of the 'required' attribute.  : bool
getRows() This method returns the 'rows' textarea attribute.  : int
getType() This method returns the type of the Element.  : string
getValue() This method returns the current value of the 'value' attribute.  : string
getWrap() This method returns the 'wrap' textarea attribute.  : string
outputElement() This method returns the html output tag of the Element with the name given by parameter.  : string
setAttributeWildcard() This method sets the 'wildcard' attribute with the given value and returns self.  : self
setAutofocus() This method sets the 'autofocus' attribute with the given value and returns self.  : self
setClass() This method sets the 'class' attribute with the given value and returns self.  : self
setCol() This method sets the 'cols' textarea attribute.  : self
setContentText() This method sets the 'text' of the textarea.  : self
setDirname() This method sets the 'dirname' textarea attribute.  : self
setDisabled() This method sets the 'disabled' attribute with the given value and returns self.  : self
setFilterInput() This method sets the FilterInput of the Element and returns self.  : self
setForm() This method sets the 'form' attribute with the given value and returns self.  : self
setId() This method sets the 'id' attribute with the given value and returns self.  : self
setLabelFor() This method sets the 'label' tag with the given value and returns self.  : self
setMaxlength() This method sets the 'maxLength' attribute with the given value and returns self.  : self
setOnclick() This method sets the 'onclick' event attribute with the given value and returns self.  : self
setOncopy() This method sets the 'oncopy' event attribute with the given value and returns self.  : self
setOncut() This method sets the 'oncut' event attribute with the given value and returns self.  : self
setOndblclick() This method sets the 'ondblclick' event attribute with the given value and returns self.  : self
setOndrag() This method sets the 'ondrag' event attribute with the given value and returns self.  : self
setOndragend() This method sets the 'ondragend' event attribute with the given value and returns self.  : self
setOndragenter() This method sets the 'ondragenter' event attribute with the given value and returns self.  : self
setOndragleave() This method sets the 'ondragleave' event attribute with the given value and returns self.  : self
setOndragover() This method sets the 'ondragover' event attribute with the given value and returns self.  : self
setOndragstart() This method sets the 'ondragstart' event attribute with the given value and returns self.  : self
setOndrop() This method sets the 'ondrop' event attribute with the given value and returns self.  : self
setOnkeydown() This method sets the 'onkeydown' event attribute with the given value and returns self.  : self
setOnkeypress() This method sets the 'onkeypress' event attribute with the given value and returns self.  : self
setOnkeyup() This method sets the 'onkeyup' event attribute with the given value and returns self.  : self
setOnmousedown() This method sets the 'onmousedown' event attribute with the given value and returns self.  : self
setOnmousemove() This method sets the 'onmousemove' event attribute with the given value and returns self.  : self
setOnmouseout() This method sets the 'onmouseout' event attribute with the given value and returns self.  : self
setOnmouseover() This method sets the 'onmouseover' event attribute with the given value and returns self.  : self
setOnmouseup() This method sets the 'onmouseup' event attribute with the given value and returns self.  : self
setOnmousewheel() This method sets the 'onmousewheel' event attribute with the given value and returns self.  : self
setOnpaste() This method sets the 'onpaste' event attribute with the given value and returns self.  : self
setOnscroll() This method sets the 'onscroll' event attribute with the given value and returns self.  : self
setOnwheel() This method sets the 'onwheel' event attribute with the given value and returns self.  : self
setPlaceholder() This method sets the 'placeholder' attribute with the given value and returns self.  : self
setReadonly() This method sets the 'readonly' attribute with the given value and returns self.  : self
setRegex() This method sets the 'regex' attribute with the given regex and returns self.  : self
setRequired() This method sets the 'required' attribute with the given value and returns self.  : self
setRows() This method sets the 'rows' textarea attribute.  : self
setValue() This method sets the 'value' attribute with the given value and returns self.  : self
setWrap() This method sets the 'wrap' textarea attribute.  : self
getRichFormFactory()  : string
outputAttributes() This method outputs the attributes (html) of the Element.  : string

Constants

WRAP_HARD

public mixed WRAP_HARD = 'hard'

WRAP_SOFT

public mixed WRAP_SOFT = 'soft'

Properties

$attributeWildcard

protected string $attributeWildcard = ''

$classRichFormFactory

protected static string|null $classRichFormFactory = null

$elements

protected static mixed $elements = null

$elementsClass

protected static array<string|int, mixed> $elementsClass = []

Methods

__construct()

Constructor. It creates the Textarea with the given value.

public __construct([string $value = '' ][, FilterInput $filterInput = null ]) : mixed
Parameters
$value : string = ''

To set the value of the textarea.

$filterInput : FilterInput = null

To set an specific FilterInput. If null, then the constructor sets a default FilterInput.

Return values
mixed

getAttributeWildcard()

This method returns the current value of the 'wildcard' attribute.

public getAttributeWildcard() : string
Return values
string

getAutofocus()

This method returns the current value of the 'autofocus' attribute.

public getAutofocus() : bool
Return values
bool

getClass()

This method returns the current value of the 'class' attribute.

public getClass() : string
Return values
string

getCol()

This method returns the 'cols' textarea attribute.

public getCol() : int
Return values
int

getContentText()

This method returns the 'text' of the textarea.

public getContentText() : string
Return values
string

getDirname()

This method returns the 'dirname' textarea attribute.

public getDirname() : string
Return values
string

getDisabled()

This method returns the current value of the 'disabled' attribute.

public getDisabled() : bool
Return values
bool

getForm()

This method returns the current value of the 'form' attribute.

public getForm() : string
Return values
string

getId()

This method returns the current value of the 'id' attribute.

public getId() : string
Return values
string

getLabelFor()

This method returns the label tag output.

public getLabelFor([bool $required = false ]) : string
Parameters
$required : bool = false
Return values
string

getMaxlength()

This method returns the current value of the 'maxLength' attribute.

public getMaxlength() : int
Return values
int

getOnclick()

This method returns the current value of the 'onclick' event attribute.

public getOnclick() : string
Return values
string

getOncopy()

This method returns the current value of the 'oncopy' event attribute.

public getOncopy() : string
Return values
string

getOncut()

This method returns the current value of the 'oncut' event attribute.

public getOncut() : string
Return values
string

getOndblclick()

This method returns the current value of the 'ondblclick' event attribute.

public getOndblclick() : string
Return values
string

getOndrag()

This method returns the current value of the 'ondrag' event attribute.

public getOndrag() : string
Return values
string

getOndragend()

This method returns the current value of the 'ondragend' event attribute.

public getOndragend() : string
Return values
string

getOndragenter()

This method returns the current value of the 'ondragenter' event attribute.

public getOndragenter() : string
Return values
string

getOndragleave()

This method returns the current value of the 'ondragleave' event attribute.

public getOndragleave() : string
Return values
string

getOndragover()

This method returns the current value of the 'ondragover' event attribute.

public getOndragover() : string
Return values
string

getOndragstart()

This method returns the current value of the 'ondragstart' event attribute.

public getOndragstart() : string
Return values
string

getOndrop()

This method returns the current value of the 'ondrop' event attribute.

public getOndrop() : string
Return values
string

getOnkeydown()

This method returns the current value of the 'onkeydown' event attribute.

public getOnkeydown() : string
Return values
string

getOnkeypress()

This method returns the current value of the 'onkeypress' event attribute.

public getOnkeypress() : string
Return values
string

getOnkeyup()

This method returns the current value of the 'onkeyup' event attribute.

public getOnkeyup() : string
Return values
string

getOnmousedown()

This method returns the current value of the 'onmousedown' event attribute.

public getOnmousedown() : string
Return values
string

getOnmousemove()

This method returns the current value of the 'onmousemove' event attribute.

public getOnmousemove() : string
Return values
string

getOnmouseout()

This method returns the current value of the 'onmouseout' event attribute.

public getOnmouseout() : string
Return values
string

getOnmouseover()

This method returns the current value of the 'onmouseover' event attribute.

public getOnmouseover() : string
Return values
string

getOnmouseup()

This method returns the current value of the 'onmouseup' event attribute.

public getOnmouseup() : string
Return values
string

getOnmousewheel()

This method returns the current value of the 'onmousewheel' event attribute.

public getOnmousewheel() : string
Return values
string

getOnpaste()

This method returns the current value of the 'onpaste' event attribute.

public getOnpaste() : string
Return values
string

getOnscroll()

This method returns the current value of the 'onscroll' event attribute.

public getOnscroll() : string
Return values
string

getOnwheel()

This method returns the current value of the 'onwheel' event attribute.

public getOnwheel() : string
Return values
string

getPlaceholder()

This method returns the current value of the 'placeholder' attribute.

public getPlaceholder() : string
Return values
string

getReadonly()

This method returns the current value of the 'readonly' attribute.

public getReadonly() : bool
Return values
bool

getRegex()

This method returns the current regex of the 'regex' attribute.

public getRegex() : string
Return values
string

getRequired()

This method returns the current value of the 'required' attribute.

public getRequired() : bool
Return values
bool

getRows()

This method returns the 'rows' textarea attribute.

public getRows() : int
Return values
int

getType()

This method returns the type of the Element.

public getType() : string
Return values
string

getValue()

This method returns the current value of the 'value' attribute.

public getValue() : string
Return values
string

getWrap()

This method returns the 'wrap' textarea attribute.

public getWrap() : string
Return values
string

outputElement()

This method returns the html output tag of the Element with the name given by parameter.

public outputElement([string $name = '' ][, array<string|int, mixed> $richFormList = [] ]) : string
Parameters
$name : string = ''
$richFormList : array<string|int, mixed> = []
Tags
see
Element::outputElement()
Return values
string

setAttributeWildcard()

This method sets the 'wildcard' attribute with the given value and returns self.

public setAttributeWildcard(string $attributeWildcard) : self
Parameters
$attributeWildcard : string
Return values
self

setAutofocus()

This method sets the 'autofocus' attribute with the given value and returns self.

public setAutofocus(bool $autofocus) : self
Parameters
$autofocus : bool
Return values
self

setClass()

This method sets the 'class' attribute with the given value and returns self.

public setClass(string $class) : self
Parameters
$class : string
Return values
self

setCol()

This method sets the 'cols' textarea attribute.

public setCol(int $col) : self
Parameters
$col : int
Return values
self

setContentText()

This method sets the 'text' of the textarea.

public setContentText(string $text) : self
Parameters
$text : string
Return values
self

setDirname()

This method sets the 'dirname' textarea attribute.

public setDirname(string $dirname) : self
Parameters
$dirname : string
Return values
self

setDisabled()

This method sets the 'disabled' attribute with the given value and returns self.

public setDisabled(bool $disabled) : self
Parameters
$disabled : bool
Return values
self

setFilterInput()

This method sets the FilterInput of the Element and returns self.

public setFilterInput([FilterInput $filterInput = null ]) : self
Parameters
$filterInput : FilterInput = null
Return values
self

setForm()

This method sets the 'form' attribute with the given value and returns self.

public setForm(string $form) : self
Parameters
$form : string
Return values
self

setId()

This method sets the 'id' attribute with the given value and returns self.

public setId(string $id) : self
Parameters
$id : string
Return values
self

setLabelFor()

This method sets the 'label' tag with the given value and returns self.

public setLabelFor(string $label) : self
Parameters
$label : string
Return values
self

setMaxlength()

This method sets the 'maxLength' attribute with the given value and returns self.

public setMaxlength(int $maxlength) : self
Parameters
$maxlength : int
Return values
self

setOnclick()

This method sets the 'onclick' event attribute with the given value and returns self.

public setOnclick(string $onclick) : self
Parameters
$onclick : string
Return values
self

setOncopy()

This method sets the 'oncopy' event attribute with the given value and returns self.

public setOncopy(string $oncopy) : self
Parameters
$oncopy : string
Return values
self

setOncut()

This method sets the 'oncut' event attribute with the given value and returns self.

public setOncut(string $oncut) : self
Parameters
$oncut : string
Return values
self

setOndblclick()

This method sets the 'ondblclick' event attribute with the given value and returns self.

public setOndblclick(string $ondblclick) : self
Parameters
$ondblclick : string
Return values
self

setOndrag()

This method sets the 'ondrag' event attribute with the given value and returns self.

public setOndrag(string $ondrag) : self
Parameters
$ondrag : string
Return values
self

setOndragend()

This method sets the 'ondragend' event attribute with the given value and returns self.

public setOndragend(string $ondragend) : self
Parameters
$ondragend : string
Return values
self

setOndragenter()

This method sets the 'ondragenter' event attribute with the given value and returns self.

public setOndragenter(string $ondragenter) : self
Parameters
$ondragenter : string
Return values
self

setOndragleave()

This method sets the 'ondragleave' event attribute with the given value and returns self.

public setOndragleave(string $ondragleave) : self
Parameters
$ondragleave : string
Return values
self

setOndragover()

This method sets the 'ondragover' event attribute with the given value and returns self.

public setOndragover(string $ondragover) : self
Parameters
$ondragover : string
Return values
self

setOndragstart()

This method sets the 'ondragstart' event attribute with the given value and returns self.

public setOndragstart(string $ondragstart) : self
Parameters
$ondragstart : string
Return values
self

setOndrop()

This method sets the 'ondrop' event attribute with the given value and returns self.

public setOndrop(string $ondrop) : self
Parameters
$ondrop : string
Return values
self

setOnkeydown()

This method sets the 'onkeydown' event attribute with the given value and returns self.

public setOnkeydown(string $onkeydown) : self
Parameters
$onkeydown : string
Return values
self

setOnkeypress()

This method sets the 'onkeypress' event attribute with the given value and returns self.

public setOnkeypress(string $onkeypress) : self
Parameters
$onkeypress : string
Return values
self

setOnkeyup()

This method sets the 'onkeyup' event attribute with the given value and returns self.

public setOnkeyup(string $onkeyup) : self
Parameters
$onkeyup : string
Return values
self

setOnmousedown()

This method sets the 'onmousedown' event attribute with the given value and returns self.

public setOnmousedown(string $onmousedown) : self
Parameters
$onmousedown : string
Return values
self

setOnmousemove()

This method sets the 'onmousemove' event attribute with the given value and returns self.

public setOnmousemove(string $onmousemove) : self
Parameters
$onmousemove : string
Return values
self

setOnmouseout()

This method sets the 'onmouseout' event attribute with the given value and returns self.

public setOnmouseout(string $onmouseout) : self
Parameters
$onmouseout : string
Return values
self

setOnmouseover()

This method sets the 'onmouseover' event attribute with the given value and returns self.

public setOnmouseover(string $onmouseover) : self
Parameters
$onmouseover : string
Return values
self

setOnmouseup()

This method sets the 'onmouseup' event attribute with the given value and returns self.

public setOnmouseup(string $onmouseup) : self
Parameters
$onmouseup : string
Return values
self

setOnmousewheel()

This method sets the 'onmousewheel' event attribute with the given value and returns self.

public setOnmousewheel(string $onmousewheel) : self
Parameters
$onmousewheel : string
Return values
self

setOnpaste()

This method sets the 'onpaste' event attribute with the given value and returns self.

public setOnpaste(string $onpaste) : self
Parameters
$onpaste : string
Return values
self

setOnscroll()

This method sets the 'onscroll' event attribute with the given value and returns self.

public setOnscroll(string $onscroll) : self
Parameters
$onscroll : string
Return values
self

setOnwheel()

This method sets the 'onwheel' event attribute with the given value and returns self.

public setOnwheel(string $onwheel) : self
Parameters
$onwheel : string
Return values
self

setPlaceholder()

This method sets the 'placeholder' attribute with the given value and returns self.

public setPlaceholder(string $placeholder) : self
Parameters
$placeholder : string
Return values
self

setReadonly()

This method sets the 'readonly' attribute with the given value and returns self.

public setReadonly(bool $readonly) : self
Parameters
$readonly : bool
Return values
self

setRegex()

This method sets the 'regex' attribute with the given regex and returns self.

public setRegex(string $regex) : self
Parameters
$regex : string
Return values
self

setRequired()

This method sets the 'required' attribute with the given value and returns self.

public setRequired(bool $required) : self
Parameters
$required : bool
Return values
self

setRows()

This method sets the 'rows' textarea attribute.

public setRows(int $rows) : self
Parameters
$rows : int
Return values
self

setValue()

This method sets the 'value' attribute with the given value and returns self.

public setValue(string $value) : self
Parameters
$value : string
Return values
self

setWrap()

This method sets the 'wrap' textarea attribute.

public setWrap(string $wrap) : self

Possible values:

  • Form::WRAP_SOFT
  • Form::WRAP_HARD
Parameters
$wrap : string
Return values
self

getRichFormFactory()

protected static getRichFormFactory() : string
Return values
string

outputAttributes()

This method outputs the attributes (html) of the Element.

protected outputAttributes(string $name[, array<string|int, mixed> $richFormList = [] ]) : string
Parameters
$name : string
$richFormList : array<string|int, mixed> = []
Return values
string

Search results