public function CiviEntityStorage::civiPostDelete in CiviCRM Entity 8.3
Allows CiviCRM hook to invoke delete.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity deleted.
See also
\Drupal\Core\Entity\EntityStorageInterface::delete
File
- src/
CiviEntityStorage.php, line 752
Class
- CiviEntityStorage
- Defines entity class for external CiviCRM entities.
Namespace
Drupal\civicrm_entityCode
public function civiPostDelete(EntityInterface $entity) {
if (!empty($entity->drupal_crud)) {
return;
}
$this
->doDeleteFieldItems([
$entity,
]);
$this
->resetCache([
$entity
->id(),
]);
CivicrmEntity::postDelete($this, [
$entity,
]);
$this
->invokeHook('delete', $entity);
}