ArrayInsertionUtil
in package
Class ArrayInsertionUtil
Table of Contents
Methods
- insert() : mixed
- If the values to be inserted contain a key _parent_id they will only be inserted if the parent node ID matches their ID
- filterValues() : array<string|int, mixed>|mixed
Methods
insert()
If the values to be inserted contain a key _parent_id they will only be inserted if the parent node ID matches their ID
public
static insert(mixed &$array, array<string|int, mixed> $parts, mixed $values) : mixed
Parameters
- $array : mixed
-
The array to insert the value in
- $parts : array<string|int, mixed>
-
Path to insertion point with structure: [[ name => is_multiple ], ..]
- $values : mixed
-
The value to be inserted
filterValues()
private
static filterValues(mixed $parentArray, mixed $isMulti, mixed $values) : array<string|int, mixed>|mixed
Parameters
- $parentArray : mixed
- $isMulti : mixed
- $values : mixed