CRUDUI PHP API

Buttons
in package

FinalYes

Form buttons: the actions a spec declares with root buttons, rendered in the form footer.

Table of Contents

Constants

ATTRIBUTES  : mixed = ['type', 'class', 'style', 'name', 'value', 'hr...
Attribute names of an evaluated button, in output order.
DEFAULT  : mixed = [['type' => 'submit']]
The buttons of a form whose spec declares none: one submit button.
TYPES  : mixed = ['submit', 'reset', 'button', 'link']
Button kinds a spec can declare. A link renders an anchor.

Methods

bind()  : array<string|int, mixed>
Evaluate the template buttons for a record in declaration order.
bindPublic()  : array<string|int, mixed>
Evaluate public input with the same template, data and option checks as form binding.
html()  : string
Markup of the form buttons; every renderer inserts this one string into the footer controls group.
htmlPublic()  : string
Markup of public input after checking that every element is an evaluated button.
evaluated()  : bool
Whether a value has the tag, text and string attributes that the markup reads.
script()  : string|null
A behavior script: a string, or the script of a label and script action.

Constants

ATTRIBUTES

Attribute names of an evaluated button, in output order.

public mixed ATTRIBUTES = ['type', 'class', 'style', 'name', 'value', 'href', 'onclick']

DEFAULT

The buttons of a form whose spec declares none: one submit button.

public mixed DEFAULT = [['type' => 'submit']]

TYPES

Button kinds a spec can declare. A link renders an anchor.

public mixed TYPES = ['submit', 'reset', 'button', 'link']

Methods

bind()

Evaluate the template buttons for a record in declaration order.

public static bind(stdClass $template, stdClass $data, string $language) : array<string|int, mixed>
Parameters
$template : stdClass
$data : stdClass
$language : string
Return values
array<string|int, mixed>

bindPublic()

Evaluate public input with the same template, data and option checks as form binding.

public static bindPublic(stdClass $template, mixed $data, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$template : stdClass
$data : mixed
$options : array<string|int, mixed>
Return values
array<string|int, mixed>

html()

Markup of the form buttons; every renderer inserts this one string into the footer controls group.

public static html(array<string|int, mixed> $buttons) : string
Parameters
$buttons : array<string|int, mixed>
Return values
string

htmlPublic()

Markup of public input after checking that every element is an evaluated button.

public static htmlPublic(mixed $buttons) : string
Parameters
$buttons : mixed
Return values
string

evaluated()

Whether a value has the tag, text and string attributes that the markup reads.

private static evaluated(mixed $button) : bool
Parameters
$button : mixed
Return values
bool

script()

A behavior script: a string, or the script of a label and script action.

private static script(mixed $behavior, string $action) : string|null
Parameters
$behavior : mixed
$action : string
Return values
string|null
On this page

Search results