\Pivot\Core\TraitsModifyCollectionTrait

Modify Collection Trait

Summary

Methods
Properties
Constants
modifyCollection()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

modifyCollection()

modifyCollection(\Pivot\Core\Traits\Entity  $entityWithCollection, array  $submittedArray, string  $param, string  $className,   $getOverride = null) : \Pivot\Core\Traits\Entity

Remove missing relations, add new relations, and ignore non-changed

Parameters

\Pivot\Core\Traits\Entity $entityWithCollection
array $submittedArray

Array to calculate changes from

string $param

param of the entity that has the collection

string $className

Class of the assoicated collection entity

$getOverride

Returns

\Pivot\Core\Traits\Entity —

with modified collection