TypeInline1n extends AbstractFieldGenerator implements FieldGeneratorInterface
FinalYes
Generate data for type=inline fields
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Interfaces
- FieldGeneratorInterface
- Interface for field value generators
Properties
- $matchArray : array<string|int, mixed>
Methods
- __construct() : mixed
- generate() : int
- Returns the generated value to be inserted into DB for this field
- match() : bool
- Additionally check that "foreign_table" is set to something.
- checkMatchArray() : bool
- Recursive compare of $data with $matchArray.
Properties
$matchArray
protected
array<string|int, mixed>
$matchArray
= ['fieldConfig' => ['config' => ['type' => 'inline', 'foreign_field' => 'parentid', 'foreign_table_field' => 'parenttable']]]
If all of these settings are identical to given values, match is true
Methods
__construct()
public
__construct(ConnectionPool $connectionPool, RecordData $recordData) : mixed
Parameters
- $connectionPool : ConnectionPool
- $recordData : RecordData
generate()
Returns the generated value to be inserted into DB for this field
public
generate(array<string|int, mixed> $data) : int
Parameters
- $data : array<string|int, mixed>
Return values
intmatch()
Additionally check that "foreign_table" is set to something.
public
match(array<string|int, mixed> $data) : bool
Parameters
- $data : array<string|int, mixed>
Return values
boolcheckMatchArray()
Recursive compare of $data with $matchArray.
protected
checkMatchArray(array<string|int, mixed> $data, array<string|int, mixed> $matchArray) : bool
Parameters
- $data : array<string|int, mixed>
-
Given data
- $matchArray : array<string|int, mixed>
-
Part to mach against