function EntityInterface::preDelete

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::preDelete()
  2. 10 core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::preDelete()
  3. 11.x core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::preDelete()

Acts on entities before they are deleted and before hooks are invoked.

Used before the entities are deleted and before invoking the delete hook.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.

\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.

2 methods override EntityInterface::preDelete()
EntityBase::preDelete in core/lib/Drupal/Core/Entity/EntityBase.php
Acts on entities before they are deleted and before hooks are invoked.
ViewUI::preDelete in core/modules/views_ui/src/ViewUI.php
Acts on entities before they are deleted and before hooks are invoked.

File

core/lib/Drupal/Core/Entity/EntityInterface.php, line 306

Class

EntityInterface
Defines a common interface for all entity objects.

Namespace

Drupal\Core\Entity

Code

public static function preDelete(EntityStorageInterface $storage, array $entities);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.