public function ContentEntityStorageTrait::delete in Multiversion 8
Same name and namespace in other branches
- 8.2 src/Entity/Storage/ContentEntityStorageTrait.php \Drupal\multiversion\Entity\Storage\ContentEntityStorageTrait::delete()
4 calls to ContentEntityStorageTrait::delete()
- CommentStorage::delete in src/
Entity/ Storage/ Sql/ CommentStorage.php - Deletes permanently saved entities.
- MenuLinkContentStorage::delete in src/
Entity/ Storage/ Sql/ MenuLinkContentStorage.php - Deletes permanently saved entities.
- NodeStorage::delete in src/
Entity/ Storage/ Sql/ NodeStorage.php - @todo: {@link https://www.drupal.org/node/2597534 Figure out why we need this}, core seems to solve it some other way.
- TermStorage::delete in src/
Entity/ Storage/ Sql/ TermStorage.php - Deletes permanently saved entities.
File
- src/
Entity/ Storage/ ContentEntityStorageTrait.php, line 473
Class
Namespace
Drupal\multiversion\Entity\StorageCode
public function delete(array $entities) {
// Entities are always "deleted" as new revisions when using a Multiversion
// storage handler.
$ids = [];
foreach ($entities as $entity) {
$ids[] = $entity
->id();
$entity->_deleted->value = TRUE;
$this
->save($entity);
}
// Reset the static cache for the "deleted" entities.
$this
->resetCache(array_keys($ids));
}