TypeInlineFalSelectSingle12Foreign extends AbstractFieldGenerator implements FieldGeneratorInterface
FinalYes
Generate data for fal_1 field of tx_styleguide_elements_select_single_12_foreign
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Interfaces
- FieldGeneratorInterface
- Interface for field value generators
Properties
- $first : bool
- Well ... this one is called twice, and we want one image for the first image and a different one for the second image ... this static property tracks that since there is no other indication if that is the first or second call.
- $matchArray : array<string|int, mixed>
Methods
- __construct() : mixed
- generate() : int
- Returns the generated value to be inserted into DB for this field
- match() : bool
- General match implementation checks input array against $this->matchArray.
- checkMatchArray() : bool
- Recursive compare of $data with $matchArray.
Properties
$first
Well ... this one is called twice, and we want one image for the first image and a different one for the second image ... this static property tracks that since there is no other indication if that is the first or second call.
protected
static bool
$first
= true
$matchArray
protected
array<string|int, mixed>
$matchArray
= ['fieldName' => 'fal_1', 'fieldConfig' => ['label' => 'fal_1 selicon_field', 'config' => ['type' => 'file', 'relationship' => 'manyToOne']]]
If all of these settings are identical to given values, match is true
Methods
__construct()
public
__construct(RecordFinder $recordFinder) : mixed
Parameters
- $recordFinder : RecordFinder
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()
General match implementation checks input array against $this->matchArray.
public
match(array<string|int, mixed> $data) : bool
If all keys and values of matchArray exist in $data and are identical, this generator matches.
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