CRUDUI PHP API

Widget
in package

FinalYes

Evaluate field controls without generating HTML.

Table of Contents

Constants

KINDS  : mixed = ['text' => 'text', 'string' => 'text', 'email'...
MEMBERS  : mixed = ['kind', 'layout', 'tag', 'attrs', 'text', 'raw...
Widget model members in their output order (docs/spec/form-runtime.md).

Properties

$design  : stdClass
$id  : string
$language  : string
$name  : string
$options  : array<string|int, mixed>
$path  : string
$rows  : array<string|int, mixed>
$spec  : stdClass
$value  : mixed

Methods

evaluate()  : stdClass
Evaluate a supported widget model or report its unsupported field type.
__construct()  : mixed
affix()  : mixed
affixes()  : array<string|int, mixed>
behavior()  : array<string|int, mixed>
button()  : stdClass
A button element with the content text; behavior scripts are its event attributes.
choices()  : stdClass
condition()  : stdClass
A condition field: a textarea holding the condition text of its tree, marked for the browser bindings that decode it (docs/spec/form-markup.md, Condition fields).
data()  : array<string|int, mixed>
display()  : stdClass
displayValue()  : string
dynamic()  : bool
editor()  : stdClass
file()  : stdClass
input()  : stdClass
items()  : array<string|int, mixed>
js()  : string
json()  : string
JSON text as JSON.stringify writes it, each number as Numbers::string writes it.
main()  : string
model()  : stdClass
opt()  : string|null
options()  : array<string|int, mixed>
placeholder()  : array<string|int, mixed>
placeholderOption()  : object
The one option of a select or search field with no option: value '' and the untranslated text select (CUSC-080).
range()  : stdClass
A range input with the bounds and the step of its required validate.range and validate.step; compilation has checked them.
select()  : stdClass
source()  : stdClass
style()  : array<string|int, mixed>
t()  : string
textarea()  : stdClass

Constants

KINDS

private mixed KINDS = ['text' => 'text', 'string' => 'text', 'email' => 'email', 'number' => 'number', 'integer' => 'number', 'float' => 'number', 'decimal' => 'number', 'range' => 'range', 'password' => 'password', 'textarea' => 'textarea', 'condition' => 'condition', 'select' => 'select', 'dropdown' => 'select', 'selectbox' => 'select', 'hidden' => 'hidden', 'choice' => 'choice', 'radio' => 'choice', 'multichoice' => 'multichoice', 'checkboxes' => 'multichoice', 'checkcontainer' => 'multichoice', 'date' => 'date', 'datetime' => 'datetime', 'datetime-local' => 'datetime', 'dummy' => 'dummy', 'html' => 'dummy', 'static' => 'dummy', 'dummy-input' => 'dummy-input', 'image' => 'image', 'file' => 'file', 'cover' => 'cover', 'cover-simple' => 'cover', 'image-viewer' => 'image-viewer', 'search' => 'search', 'autocomplete' => 'search', 'tinymce' => 'tinymce', 'wysiwyg' => 'tinymce', 'summernote' => 'summernote', 'editorjs' => 'editorjs', 'tui' => 'tui', 'button' => 'button', 'action' => 'button', 'tagify' => 'tagify', 'tagify2' => 'tagify2']

MEMBERS

Widget model members in their output order (docs/spec/form-runtime.md).

private mixed MEMBERS = ['kind', 'layout', 'tag', 'attrs', 'text', 'rawHtml', 'source', 'options', 'itemLabelClass', 'script', 'styleChrome', 'prepend', 'append', 'extra', 'condition']

Properties

$design

private stdClass $design

$language

private string $language

$options

private array<string|int, mixed> $options

$rows

private array<string|int, mixed> $rows

Methods

evaluate()

Evaluate a supported widget model or report its unsupported field type.

public static evaluate(stdClass $spec, mixed $value, string $path, stdClass $design, array<string|int, mixed> $options, array<string|int, mixed> $rows) : stdClass
Parameters
$spec : stdClass
$value : mixed
$path : string
$design : stdClass
$options : array<string|int, mixed>
$rows : array<string|int, mixed>
Return values
stdClass

__construct()

private __construct(stdClass $spec, mixed $value, string $path, stdClass $design, array<string|int, mixed> $options, array<string|int, mixed> $rows) : mixed
Parameters
$spec : stdClass
$value : mixed
$path : string
$design : stdClass
$options : array<string|int, mixed>
$rows : array<string|int, mixed>

affix()

private affix(string $kind) : mixed
Parameters
$kind : string

affixes()

private affixes() : array<string|int, mixed>
Return values
array<string|int, mixed>

behavior()

private behavior() : array<string|int, mixed>
Return values
array<string|int, mixed>

button()

A button element with the content text; behavior scripts are its event attributes.

private button() : stdClass
Return values
stdClass

choices()

private choices(string $kind) : stdClass
Parameters
$kind : string
Return values
stdClass

condition()

A condition field: a textarea holding the condition text of its tree, marked for the browser bindings that decode it (docs/spec/form-markup.md, Condition fields).

private condition() : stdClass
Return values
stdClass

data()

private data() : array<string|int, mixed>
Return values
array<string|int, mixed>

display()

private display(string $kind) : stdClass
Parameters
$kind : string
Return values
stdClass

displayValue()

private displayValue() : string
Return values
string

dynamic()

private dynamic() : bool
Return values
bool

editor()

private editor(string $kind) : stdClass
Parameters
$kind : string
Return values
stdClass

file()

private file(string $kind) : stdClass
Parameters
$kind : string
Return values
stdClass

input()

private input(string $kind) : stdClass
Parameters
$kind : string
Return values
stdClass

items()

private items() : array<string|int, mixed>
Return values
array<string|int, mixed>

js()

private static js(string $value) : string
Parameters
$value : string
Return values
string

json()

JSON text as JSON.stringify writes it, each number as Numbers::string writes it.

private static json(mixed $value) : string
Parameters
$value : mixed
Return values
string

main()

private main(string $base) : string
Parameters
$base : string
Return values
string

model()

private model(string $kind, string $layout, array<string|int, mixed> $attrs[, array<string|int, mixed> $extra = [] ]) : stdClass
Parameters
$kind : string
$layout : string
$attrs : array<string|int, mixed>
$extra : array<string|int, mixed> = []
Return values
stdClass

opt()

private opt(string $key[, string|null $default = null ]) : string|null
Parameters
$key : string
$default : string|null = null
Return values
string|null

options()

private options([bool $choice = false ]) : array<string|int, mixed>
Parameters
$choice : bool = false
Return values
array<string|int, mixed>

placeholder()

private placeholder() : array<string|int, mixed>
Return values
array<string|int, mixed>

placeholderOption()

The one option of a select or search field with no option: value '' and the untranslated text select (CUSC-080).

private static placeholderOption() : object
Return values
object

range()

A range input with the bounds and the step of its required validate.range and validate.step; compilation has checked them.

private range() : stdClass
Return values
stdClass

select()

private select(string $kind) : stdClass
Parameters
$kind : string
Return values
stdClass

source()

private source() : stdClass
Return values
stdClass

style()

private style() : array<string|int, mixed>
Return values
array<string|int, mixed>

t()

private t(mixed $value) : string
Parameters
$value : mixed
Return values
string

textarea()

private textarea() : stdClass
Return values
stdClass
On this page

Search results