webCOMAND

collection::delete()

Delete all objects in the collection.

Prototype

collection delete(array $options = [])

Parameters

  • options - Associative array of options with the following keys.
    • batch_delete - When TRUE, objects in the collection will be deleted in a batch per content type to more efficiently remove many objects when there are multiple objects of the same type(s) within the collection.

Example

$contacts = $repo->get('FROM Contact WHERE Disabled');
$contacts->delete(['batch_delete' => TRUE]);