Select

Extends \Dotpay\Html\Container\Container

Represent a HTML select element.

package

Default

Methods

Initialize the element.

__construct(string $type = '', string $name = null) 
inherited

Arguments

$type

string

A type of the element

$name

string

A name of the element

Return a HTML string of the node element.

__toString() : string
inherited

Response

string

Add a new child to the container.

addChild(\Dotpay\Html\Node $child) 
inherited

Arguments

$child

\Dotpay\Html\Node

A child of the container

Add a new option element to a list of options which belong to the select element.

addOption(\Dotpay\Html\Form\Option $option) : \Dotpay\Html\Form\Select

Arguments

$option

\Dotpay\Html\Form\Option

An option to add

Response

\Dotpay\Html\Form\Select

Check if the option element contains the given value or if the given value is a text of the option.

checkValue(\Dotpay\Html\Form\Option $option, mixed $value) : boolean

Arguments

$option

\Dotpay\Html\Form\Option

An option element

$value

mixed

A given value

Response

boolean

Return a value of the attribute whoose name is given.

getAttribute(string $name) : mixed
inherited

Arguments

$name

string

The name of the attribute

Response

mixed

Return a string with a list of all attributes ot the node element.

getAttributeList() : string
inherited

Response

string

Return an array with all attributes of the node element.

getAttributes() : array
inherited

Response

array

Return children contained in the container.

getChildren() : array
inherited

Response

array

Return a class name of the element.

getClass() : string
inherited

Response

string

Return a data information.

getData(string $name) : string
inherited

Arguments

$name

string

A name of data information

Response

string

Return a name of the element.

getName() : string
inherited

Response

string

Return an array of options element which belong to the select element.

getOptions() : array

Response

array

Return an option element which is set as a selected option.

getSelected() : \Dotpay\Html\Form\Option

Return a type of the element.

getType() : string
inherited

Response

string

Remove an attribute whoose name is given.

removeAttribute(string $name) : \Dotpay\Html\Node
inherited

Arguments

$name

string

The name of the attribute

Response

\Dotpay\Html\Node

Remove the given element from a set of children of the container.

removeChild(\Dotpay\Html\Node $child) : \Dotpay\Html\Container\Container
inherited

Arguments

$child

\Dotpay\Html\Node

A HTML element which is a child of the container

Response

\Dotpay\Html\Container\Container

Remove an option element which contains the given value from the list of all options.

removeOption(mixed $value) : \Dotpay\Html\Form\Select

Arguments

$value

mixed

An value which can be also a text from an option element

Response

\Dotpay\Html\Form\Select

Set a value of the atribute whoose name is given.

setAttribute(string $name, mixed $value) : \Dotpay\Html\Node
inherited

Arguments

$name

string

The name of the attribute

$value

mixed

The value of the attribute

Response

\Dotpay\Html\Node

Set a set of children for the container.

setChildren(array $children) 
inherited

Arguments

$children

array

Children of the container

Set a class name of the element.

setClass(string $className) : \Dotpay\Html\Element
inherited

Arguments

$className

string

A class name

Response

\Dotpay\Html\Element

Set the data value as the given name.

setData(string $name, string $value) : \Dotpay\Html\Element
inherited

Arguments

$name

string

A name of a value

$value

string

A value to saving

Response

\Dotpay\Html\Element

Set a name of the element.

setName(string $name) : \Dotpay\Html\Element
inherited

Arguments

$name

string

A name of the element

Response

\Dotpay\Html\Element

Set an option element which contains the given value as the seleced option in this select element.

setSelected(mixed $value) : \Dotpay\Html\Form\Select

Arguments

$value

mixed

An value which can be also a text from an option element

Response

\Dotpay\Html\Form\Select

Set a type of the element.

setType(string $type) : \Dotpay\Html\Element
inherited

Arguments

$type

string

A type of the element

Response

\Dotpay\Html\Element

Properties

An option element which is set as a selected option

selected : \Dotpay\Html\Form\Option
var

An option element which is set as a selected option

Type(s)

\Dotpay\Html\Form\Option

Elements which are children of the container

children : array
inherited
var

Elements which are children of the container

Type(s)

array

A type of the element

type : string
inherited
var

A type of the element

Type(s)

string

List of all attributes of the node

attributes : array
inherited
var

List of all attributes of the node

Type(s)

array