PostMutatorTrait
+ Inheritance diagram for PostMutatorTrait:

Description

Adds helpers to entities with fields that have to mutated through POST after creation.

Protected Methods

$this _addWithPost (string $addPath, array $postData, string $field, array $diff)
 For existing entities this adds references to other entities via the given POST path. More...
 
$this _removeWithPost (string $rmPath, array $postData, string $field, array|Closure $diff)
 For existing entities this removes references to other entities via the given POST path. More...
 

Methods

◆ _addWithPost()

$this _addWithPost ( string  $addPath,
array  $postData,
string  $field,
array  $diff 
)
protected

For existing entities this adds references to other entities via the given POST path.

Stages otherwise.

Parameters
string$addPath
array$postData
string$field
array$diffFor staging.
Returns
$this

◆ _removeWithPost()

$this _removeWithPost ( string  $rmPath,
array  $postData,
string  $field,
array|Closure  $diff 
)
protected

For existing entities this removes references to other entities via the given POST path.

Stages otherwise.

Parameters
string$rmPath
array$postData
string$field
array | Closure$diffFor staging. An array, or a filter closure: fn($eachValue):bool
Returns
$this