function deleteAll(array $options)
{
if (!_elgg_is_valid_options_for_batch_operation($options, 'metadata')) {
return false;
}
$options['metastring_type'] = 'metadata';
$result = _elgg_batch_metastring_based_objects($options, 'elgg_batch_delete_callback', false);
// This moved last in case an object's constructor sets metadata. Currently the batch
// delete process has to create the entity to delete its metadata. See #5214
$this->cache->invalidateByOptions($options);
return $result;
}