You are here

function cacheflush_delete_multiple in CacheFlush 8

Same name and namespace in other branches
  1. 7.3 modules/cacheflush_entity/cacheflush_entity.module \cacheflush_delete_multiple()

Deletes all entities from ID list.

Parameters

array $ids: The list of entity IDs.

Throws

\Exception Throws exception if exists.

1 call to cacheflush_delete_multiple()
CacheFlushEntityTest::testCrudFunctions in modules/cacheflush_entity/tests/Functional/CacheFlushEntityTest.php
Tests CRUD functions for cacheflush entity.

File

modules/cacheflush_entity/cacheflush_entity.module, line 104
Cacheflush Entity API.

Code

function cacheflush_delete_multiple(array $ids) {
  $controller = \Drupal::entityTypeManager()
    ->getStorage('cacheflush');
  $entities = $controller
    ->loadMultiple($ids);
  $controller
    ->delete($entities);
}