Documentation

FormFieldConf
in package

Read onlyYes
Tags
phpstan-type

fieldvalues iterable<array{text: string, value: int|string}>

Table of Contents

Properties

$autocomplete  : string|null
$default  : IDefaultCallable|null
$id  : string|null
$isRequired  : bool
$label  : string
$model  : IModel|null
$rangeConstraint  : IRangeConstraint|null
$type  : FormFieldType
$values  : null|array<string|int, mixed>|Traversable

Methods

__construct()  : mixed

Properties

$values

public null|array<string|int, mixed>|Traversable $values

Methods

__construct()

public __construct(IModel|null $model, string $label, string|null $autocomplete, IDefaultCallable<string|int, T>|null $default, string|null $id, bool $isRequired, IRangeConstraint|null $rangeConstraint, FormFieldType $type, null|fieldvalues $values) : mixed
Parameters
$model : IModel|null

The data model for the field's value.

$label : string

The label to describe to the user the field.

$autocomplete : string|null
$default : IDefaultCallable<string|int, T>|null

A function to call with the submitted data to set the value of the field in case no value was submitted.

$id : string|null
$isRequired : bool
$rangeConstraint : IRangeConstraint|null
$type : FormFieldType

The input type of the field.

$values : null|fieldvalues

All the values allowed for the field.

Tags
template
todo

Use enum for type, with support for file and image to determine accept?

For $values, create struct for items? (with keys 'value' and 'text' or 'label')

On this page

Search results