function prev_next_entity_delete in Previous/Next API 8.2
Implements hook_entity_delete().
File
- ./
prev_next.module, line 68 - Contains prev_next.module.
Code
function prev_next_entity_delete(EntityInterface $entity) {
$bundle_names = \Drupal::service('prev_next.helper')
->getBundleNames();
if ($entity instanceof NodeInterface && in_array($entity
->getType(), $bundle_names)) {
\Drupal::service('prev_next.api')
->remove($entity
->id(), $entity
->getType());
}
}