### Options
Additionally to the default options accepted by Table::delete(), the following
keys are supported:
- cleanProperty: Whether or not to remove all the objects in $targetEntities that
are stored in $sourceEntity (default: true)
By default this method will unset each of the entity objects stored inside the
source entity.
### Example:
$article->tags = [$tag1, $tag2, $tag3, $tag4];
$tags = [$tag1, $tag2, $tag3];
$articles->association('tags')->unlink($article, $tags);
$article->get('tags') will contain only [$tag4] after deleting in the database
public unlink ( Cake\Datasource\EntityInterface $sourceEntity, array $targetEntities, array | boolean $options = [] ) : boolean | ||
$sourceEntity | Cake\Datasource\EntityInterface | an entity persisted in the source table for this association |
$targetEntities | array | list of entities persisted in the target table for this association |
$options | array | boolean | list of options to be passed to the internal `delete` call, or a `boolean` |
return | boolean | Success |