PHP Класс WPDKHTMLTagSelect

Remeber to add this tag in WPDKHTMLTagName
Автор: =undo= ([email protected])
Наследование: extends WPDKHTMLTag
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_first_item string Used to display a special first item (disable and display none and non selectable) to use instead label
$autofocus * Interface.
$disabled
$form
$multiple
$name
$size
$value

Открытые методы

Метод Описание
__construct ( array | callback $options = [], string $name = '', string $id = '' ) Create an instance of WPDKHTMLTagSelect class
draw ( ) Override parent method for draw the options with selectd values.
options ( array $options ) : string Return the HTML markup for the option and optgroup tag.
selected ( string | array $haystack, mixed $current ) : string Return HTML selected attribute or empty string.

Приватные методы

Метод Описание
_options ( array $options ) Recursive method to build the options and option group for select tag.

Описание методов

__construct() публичный Метод

Create an instance of WPDKHTMLTagSelect class
public __construct ( array | callback $options = [], string $name = '', string $id = '' )
$options array | callback A key value pairs array with value/text or a callback function
$name string Attribute name
$id string Attribute id

draw() публичный Метод

Override parent method for draw the options with selectd values.
public draw ( )

options() публичный Метод

Return the HTML markup for the option and optgroup tag.
public options ( array $options ) : string
$options array A key value pairs array. If the value is an array then an optio group is created.
Результат string

selected() публичный статический Метод

Commodity to extends selected() WordPress function with array check.
С версии: 1.2.0
public static selected ( string | array $haystack, mixed $current ) : string
$haystack string | array Single value or array
$current mixed (true) The other value to compare if not just true
Результат string HTML attribute or empty string

Описание свойств

$_first_item публичное свойство

Used to display a special first item (disable and display none and non selectable) to use instead label
С версии: 1.4.8
public string $_first_item
Результат string

$autofocus публичное свойство

* Interface.
public $autofocus

$disabled публичное свойство

public $disabled

$form публичное свойство

public $form

$multiple публичное свойство

public $multiple

$name публичное свойство

public $name

$size публичное свойство

public $size

$value публичное свойство

public $value