ChoiceView
in package
Represents a choice in templates.
Tags
Table of Contents
- $attr : mixed
- Additional attributes for the HTML tag.
- $data : mixed
- $label : mixed
- $value : mixed
- __construct() : mixed
- Creates a new choice view.
Properties
$attr
Additional attributes for the HTML tag.
public
mixed
$attr
$data
public
mixed
$data
$label
public
mixed
$label
$value
public
mixed
$value
Methods
__construct()
Creates a new choice view.
public
__construct(mixed $data, string $value, string|false $label[, array<string|int, mixed> $attr = [] ]) : mixed
Parameters
- $data : mixed
-
The original choice
- $value : string
-
The view representation of the choice
- $label : string|false
-
The label displayed to humans; pass false to discard the label
- $attr : array<string|int, mixed> = []
-
Additional attributes for the HTML tag