I want to delete all taxonomy terms of particular vocabulary using entity_delete_multiple
. For node it is working fine
$result = \Drupal::entityQuery('node')
->condition('type', 'page')
->execute();
entity_delete_multiple('node', $result);
If i am changing taxonomy_term and type to tags or any other vocabulary
, or replaced type by bundle
$result = \Drupal::entityQuery('taxonomy_term')
->condition('type', 'tags')
->execute();
entity_delete_multiple('taxonomy_term', $result);
it is throwing error like this.
Drupal\Core\Entity\Query\QueryException: 'type' not found in Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable() (line 304 of core/lib/Drupal/Core/Entity/Query/Sql/Tables.php).
And also i need a same query to delete user(s), watchdog and profiles.
Is there any way to do it?