function rollBackCollectionMembership( $rollBackAction, $collectionId, $collectionMemberId, $sourceIdentifier, $operation ) { if ( shouldRemove( $rollBackAction, $operation ) ) { removeDefinedMeaningFromCollection( $collectionMemberId, $collectionId ); } elseif ( shouldRestore( $rollBackAction, $operation ) ) { addDefinedMeaningToCollection( $collectionMemberId, $collectionId, $sourceIdentifier ); } }
function updateDefinedMeaningInCollection( $definedMeaningId, $collectionId, $internalId ) { removeDefinedMeaningFromCollection( $definedMeaningId, $collectionId ); addDefinedMeaningToCollection( $definedMeaningId, $collectionId, $internalId ); }
public function remove( $keyPath ) { $definedMeaningId = $keyPath->peek( 1 )->definedMeaningId; $collectionId = $keyPath->peek( 0 )->collectionId; removeDefinedMeaningFromCollection( $definedMeaningId, $collectionId ); }