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