Binding
in package
FinalYes
Bind compiled fields to data as nodes of the recursive form grammar.
Table of Contents
Constants
- LANGUAGES : mixed = ['ko', 'en', 'ja', 'zh']
Methods
- bind() : array<string|int, mixed>
- Evaluate every field using one template and record.
- field() : stdClass
- Build the node for one field and its group, collection or language children.
- language() : string
- The checked language option, defaulting to Korean.
- action() : stdClass
- body() : stdClass
- checkGroup() : void
- Present group data, including a repeated group row, must be an object.
- children() : array<string|int, mixed>
- collection() : stdClass
- declaredLayout() : string|null
- The design.layout a group declares; compilation has checked the value.
- header() : stdClass|Missing
- Header with the given parts, or the missing marker when every part is empty.
- lang() : stdClass
- layoutState() : array<string|int, mixed>
- The state of a group's children: a declared layout replaces the inherited one, and a line ends it.
- leaf() : stdClass
- multiple() : array<string|int, mixed>|null
- Evaluated controls and limits for a repeated field, or null when the field does not repeat.
- root() : array<string|int, mixed>
- row() : stdClass
Constants
LANGUAGES
private
mixed
LANGUAGES
= ['ko', 'en', 'ja', 'zh']
Methods
bind()
Evaluate every field using one template and record.
public
static bind(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>field()
Build the node for one field and its group, collection or language children.
public
static field(stdClass $field, string $path, stdClass $data, array<string|int, mixed> $state) : stdClass
Parameters
- $field : stdClass
- $path : string
- $data : stdClass
- $state : array<string|int, mixed>
Return values
stdClasslanguage()
The checked language option, defaulting to Korean.
public
static language(array<string|int, mixed> $options) : string
Parameters
- $options : array<string|int, mixed>
Return values
stringaction()
private
static action(string $name, string $label, bool $disabled) : stdClass
Parameters
- $name : string
- $label : string
- $disabled : bool
Return values
stdClassbody()
private
static body([string $className = '' ][, mixed $style = null ][, string|null $id = null ]) : stdClass
Parameters
- $className : string = ''
- $style : mixed = null
- $id : string|null = null
Return values
stdClasscheckGroup()
Present group data, including a repeated group row, must be an object.
private
static checkGroup(mixed $value, string $path) : void
Parameters
- $value : mixed
- $path : string
children()
private
static children(stdClass $field, string $path, stdClass $data, array<string|int, mixed> $state) : array<string|int, mixed>
Parameters
- $field : stdClass
- $path : string
- $data : stdClass
- $state : array<string|int, mixed>
Return values
array<string|int, mixed>collection()
private
static collection(stdClass $field, string $path, stdClass $data, stdClass $design, string|Missing $label, string|Missing $description, array<string|int, mixed> $settings, array<string|int, mixed> $state) : stdClass
Parameters
- $field : stdClass
- $path : string
- $data : stdClass
- $design : stdClass
- $label : string|Missing
- $description : string|Missing
- $settings : array<string|int, mixed>
- $state : array<string|int, mixed>
Return values
stdClassdeclaredLayout()
The design.layout a group declares; compilation has checked the value.
private
static declaredLayout(stdClass $spec) : string|null
Parameters
- $spec : stdClass
Return values
string|nullheader()
Header with the given parts, or the missing marker when every part is empty.
private
static header(array<string|int, mixed> $parts, stdClass $design) : stdClass|Missing
Parameters
- $parts : array<string|int, mixed>
- $design : stdClass
Return values
stdClass|Missinglang()
private
static lang(stdClass $spec, string $path, stdClass $data, stdClass $design, string|Missing $label, string|Missing $description, true|stdClass $lang, array<string|int, mixed> $state) : stdClass
Parameters
- $spec : stdClass
- $path : string
- $data : stdClass
- $design : stdClass
- $label : string|Missing
- $description : string|Missing
- $lang : true|stdClass
- $state : array<string|int, mixed>
Return values
stdClasslayoutState()
The state of a group's children: a declared layout replaces the inherited one, and a line ends it.
private
static layoutState(array<string|int, mixed> $state, string|null $layout) : array<string|int, mixed>
Parameters
- $state : array<string|int, mixed>
- $layout : string|null
Return values
array<string|int, mixed>leaf()
private
static leaf(stdClass $spec, string $path, stdClass $data, stdClass $design, string|Missing $label, string|Missing $description, array<string|int, mixed> $state) : stdClass
Parameters
- $spec : stdClass
- $path : string
- $data : stdClass
- $design : stdClass
- $label : string|Missing
- $description : string|Missing
- $state : array<string|int, mixed>
Return values
stdClassmultiple()
Evaluated controls and limits for a repeated field, or null when the field does not repeat.
private
static multiple(stdClass $spec) : array<string|int, mixed>|null
Parameters
- $spec : stdClass
Return values
array<string|int, mixed>|nullroot()
private
static root(string $kind, string $path, stdClass $design, stdClass $spec) : array<string|int, mixed>
Parameters
- $kind : string
- $path : string
- $design : stdClass
- $spec : stdClass
Return values
array<string|int, mixed>row()
private
static row(stdClass $field, string $collectionPath, string $key, int $index, int $count, string $item, string|Missing $label, array<string|int, mixed> $settings, stdClass $data, array<string|int, mixed> $state) : stdClass
Parameters
- $field : stdClass
- $collectionPath : string
- $key : string
- $index : int
- $count : int
- $item : string
- $label : string|Missing
- $settings : array<string|int, mixed>
- $data : stdClass
- $state : array<string|int, mixed>