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