function entity_delete_multiple

cis7 entity.module entity_delete_multiple($entity_type, $ids)
cle7 entity.module entity_delete_multiple($entity_type, $ids)
elmsmedia7 entity.module entity_delete_multiple($entity_type, $ids)
icor7 entity.module entity_delete_multiple($entity_type, $ids)
meedjum_blog7 entity.module entity_delete_multiple($entity_type, $ids)
mooc7 entity.module entity_delete_multiple($entity_type, $ids)

Permanently delete multiple entities.

Parameters

$entity_type: The type of the entity.

$ids: An array of entity ids of the entities to delete. In case the entity makes use of a name key, both the names or numeric ids may be passed.

Return value

FALSE if the given entity type isn't compatible to the CRUD API.

7 calls to entity_delete_multiple()
entity_delete in sites/all/modules/ulmus/entity/entity.module
Permanently delete the given entity.
entity_modules_disabled in sites/all/modules/ulmus/entity/entity.module
Implements hook_modules_disabled().
entity_watchdog_watchdog_delete_multiple in sites/all/modules/elmsln_contrib/entity_watchdog/entity_watchdog.module
Delete multiple watchdog entries.
field_collection_field_delete in sites/all/modules/ulmus/field_collection/field_collection.module
Implements hook_field_delete().
field_collection_update_7002 in sites/all/modules/ulmus/field_collection/field_collection.install
Remove orphaned field collection item entities.

... See full list

File

sites/all/modules/ulmus/entity/entity.module, line 326
Module file for the entity API.

Code

function entity_delete_multiple($entity_type, $ids) {
  $info = entity_get_info($entity_type);
  if (isset($info['deletion callback'])) {
    foreach ($ids as $id) {
      $info['deletion callback']($id);
    }
  }
  elseif (in_array('EntityAPIControllerInterface', class_implements($info['controller class']))) {
    entity_get_controller($entity_type)->delete($ids);
  }
  else {
    return FALSE;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.