function prev_next_entity_update in Previous/Next API 8.2
Implements hook_entity_update().
File
- ./
prev_next.module, line 58 - Contains prev_next.module.
Code
function prev_next_entity_update(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')
->update($entity
->id(), $entity
->getType());
}
}