Documentation

SpecFormatter
in package

Table of Contents

Methods

arrayToField()  : FieldSpec
Convert array from `$entity->getFields()` or `$entity->getCustomFields()` into a FieldSpec object
getOptions()  : array<string|int, mixed>|false
Callback function to build option lists for all entities.
setInputTypeAndAttrs()  : mixed
setLegacyDateFormat()  : mixed

Methods

arrayToField()

Convert array from `$entity->getFields()` or `$entity->getCustomFields()` into a FieldSpec object

public static arrayToField(string $fieldName, array<string|int, mixed> $data, string $entityName) : FieldSpec
Parameters
$fieldName : string
$data : array<string|int, mixed>
$entityName : string
Return values
FieldSpec

getOptions()

Callback function to build option lists for all entities.

public static getOptions(array<string|int, mixed> $field, array<string|int, mixed> $values, bool|array<string|int, mixed> $returnFormat, bool $checkPermissions) : array<string|int, mixed>|false
Parameters
$field : array<string|int, mixed>
$values : array<string|int, mixed>
$returnFormat : bool|array<string|int, mixed>
$checkPermissions : bool
Return values
array<string|int, mixed>|false

setInputTypeAndAttrs()

public static setInputTypeAndAttrs(FieldSpec $fieldSpec, array<string|int, mixed> $data) : mixed
Parameters
$fieldSpec : FieldSpec
$data : array<string|int, mixed>

setLegacyDateFormat()

public static setLegacyDateFormat(array<string|int, mixed> &$inputAttrs) : mixed
Parameters
$inputAttrs : array<string|int, mixed>

        
On this page

Search results