You are here

function node_authlink_node_delete in Node authorize link 8

Implements hook_ENTITY_TYPE_delete().

File

./node_authlink.module, line 337
Node Authlink hooks and alters.

Code

function node_authlink_node_delete(Drupal\Core\Entity\EntityInterface $entity) {
  $config = \Drupal::config('node_authlink.settings');
  $enable = $config
    ->get('enable');

  // Ignore if node type is disabled
  if (isset($enable[$entity
    ->bundle()]) && $enable[$entity
    ->bundle()]) {
    node_authlink_delete($entity
      ->id());
  }
}