Option extends Element
in package
Uses AttributesEventsTraits, AttributeValueTrait, AttributeSelectedTrait, AttributeDataTrait, AttributeDisabledTrait

This is the Option class.

This class represents an 'option' form element.
This class extends Element (FWK\Core\Form\Elements\Element), see this class.

Tags
see
Option::outputElement()
see
Element

Table of Contents

TYPE  = 'option'
$attributeWildcard  : string
$classRichFormFactory  : string|null
$data  : mixed
$disabled  : bool
$elements  : mixed
$elementsClass  : array<string|int, mixed>
$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
$selected  : bool
$value  : string
__construct() Constructor. It creates the Option with the given text.  : mixed
getAttributeWildcard() This method returns the current value of the 'wildcard' attribute.  : string
getData() This method returns the current value of the 'data' 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
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
getSelected() This method returns the current value of the 'selected' attribute.  : bool
getType() This method returns the type of the Element.  : string
getValue() This method returns the current value of the 'value' 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
setData() This method sets the 'data' attribute with the given value and returns self.  : 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
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
setSelected() This method sets the 'selected' attribute with the given value and returns self.  : self
setValue() This method sets the 'value' attribute with the given value and returns self.  : self
getRichFormFactory()  : string
outputAttributes() This method outputs the attributes (html) of the Element.  : string

Constants

TYPE

public mixed TYPE = 'option'

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 Option with the given text.

public __construct(string $text) : mixed
Parameters
$text : string

Text for the option.

Return values
mixed

getAttributeWildcard()

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

public getAttributeWildcard() : string
Return values
string

getData()

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

public getData() : string
Return values
string

getDisabled()

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

public getDisabled() : bool
Return values
bool

getFilterInput()

This method returns the FilterInput of the Element.

public getFilterInput() : FilterInput|null
Return values
FilterInput|null

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

getSelected()

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

public getSelected() : bool
Return values
bool

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

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 $selected = '' ]) : string
Parameters
$name : string = ''
$richFormList : array<string|int, mixed> = []
$selected : string = ''
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

setData()

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

public setData(mixed $data) : self
Parameters
$data : mixed
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

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

setSelected()

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

public setSelected(bool $selected) : self
Parameters
$selected : bool
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

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