Documentation

ChoiceListView
in package

Represents a choice list in templates.

A choice list contains choices and optionally preferred choices which are displayed in the very beginning of the list. Both choices and preferred choices may be grouped in instances.

Tags
author

Bernhard Schussek bschussek@gmail.com

Table of Contents

Properties

$choices  : mixed
$preferredChoices  : mixed

Methods

__construct()  : mixed
Creates a new choice list view.
hasPlaceholder()  : bool
Returns whether a placeholder is in the choices.

Properties

Methods

__construct()

Creates a new choice list view.

public __construct([array<string|int, ChoiceGroupView>|array<string|int, ChoiceView$choices = [] ][, array<string|int, ChoiceGroupView>|array<string|int, ChoiceView$preferredChoices = [] ]) : mixed
Parameters
$choices : array<string|int, ChoiceGroupView>|array<string|int, ChoiceView> = []

The choice views

$preferredChoices : array<string|int, ChoiceGroupView>|array<string|int, ChoiceView> = []

the preferred choice views

hasPlaceholder()

Returns whether a placeholder is in the choices.

public hasPlaceholder() : bool

A placeholder must be the first child element, not be in a group and have an empty value.

Return values
bool

        
On this page

Search results