public static function EntityTestBundleClass::preDelete in Drupal 10
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.
Overrides EntityBase::preDelete
File
- core/
modules/ system/ tests/ modules/ entity_test_bundle_class/ src/ Entity/ EntityTestBundleClass.php, line 76
Class
- EntityTestBundleClass
- The bundle class for the bundle_class bundle of the entity_test entity.
Namespace
Drupal\entity_test_bundle_class\EntityCode
public static function preDelete(EntityStorageInterface $storage, array $entities) {
parent::preDelete($storage, $entities);
self::$preDeleteCount++;
}