Design
in package
Evaluate visibility and appearance with the shared expression engine and visibility rule.
Table of Contents
Methods
- appearance() : string
- Resolve appearance text from a literal, expression or condition map: a string is an expression only when it parses completely; any other string is literal text.
- declared() : stdClass|Missing
- A copy of the declared control attributes (design.attributes) or, with $wrapper, the node root attributes (design.wrapper.attributes); the missing marker when none is declared.
- flag() : bool
- A boolean flag other than visibility, such as a list column's `sortable`: a missing value is false, a condition map that selects nothing is false and an expression that cannot be evaluated is false.
- resolve() : stdClass
- Evaluate the visibility and named appearance nodes for one field; $rows are the positions of the row keys in $path.
- show() : bool
- Whether a field is visible, by the validator's visibility rule: only a resolved false hides.
- condition() : mixed
- conditionMap() : mixed
- parses() : bool
- Whether a string parses completely as an expression.
Methods
appearance()
Resolve appearance text from a literal, expression or condition map: a string is an expression only when it parses completely; any other string is literal text.
public
static appearance(mixed $value, stdClass $data, array<string|int, mixed> $path, array<string|int, mixed> $rows) : string
Parameters
- $value : mixed
- $data : stdClass
- $path : array<string|int, mixed>
- $rows : array<string|int, mixed>
Return values
stringdeclared()
A copy of the declared control attributes (design.attributes) or, with $wrapper, the node root attributes (design.wrapper.attributes); the missing marker when none is declared.
public
static declared(mixed $design, bool $wrapper) : stdClass|Missing
Parameters
- $design : mixed
- $wrapper : bool
Return values
stdClass|Missingflag()
A boolean flag other than visibility, such as a list column's `sortable`: a missing value is false, a condition map that selects nothing is false and an expression that cannot be evaluated is false.
public
static flag(mixed $value, stdClass $data, array<string|int, mixed> $path, array<string|int, mixed> $rows) : bool
Parameters
- $value : mixed
- $data : stdClass
- $path : array<string|int, mixed>
- $rows : array<string|int, mixed>
Return values
boolresolve()
Evaluate the visibility and named appearance nodes for one field; $rows are the positions of the row keys in $path.
public
static resolve(mixed $design, stdClass $data, array<string|int, mixed> $path, array<string|int, mixed> $rows) : stdClass
Parameters
- $design : mixed
- $data : stdClass
- $path : array<string|int, mixed>
- $rows : array<string|int, mixed>
Return values
stdClassshow()
Whether a field is visible, by the validator's visibility rule: only a resolved false hides.
public
static show(mixed $value, stdClass $data, array<string|int, mixed> $path, array<string|int, mixed> $rows) : bool
$rows are the positions of the row keys in $path.
Parameters
- $value : mixed
- $data : stdClass
- $path : array<string|int, mixed>
- $rows : array<string|int, mixed>
Return values
boolcondition()
private
static condition(string $expression, stdClass $data, array<string|int, mixed> $path, array<string|int, mixed> $rows[, bool $raw = false ]) : mixed
Parameters
- $expression : string
- $data : stdClass
- $path : array<string|int, mixed>
- $rows : array<string|int, mixed>
- $raw : bool = false
conditionMap()
private
static conditionMap(stdClass $map, stdClass $data, array<string|int, mixed> $path, array<string|int, mixed> $rows) : mixed
Parameters
- $map : stdClass
- $data : stdClass
- $path : array<string|int, mixed>
- $rows : array<string|int, mixed>
parses()
Whether a string parses completely as an expression.
private
static parses(string $value) : bool
Parameters
- $value : string