You are here

autoban_advban.install in Automatic IP ban (Autoban) 8

Install, update and uninstall functions for the Autoban_advban module.

File

modules/autoban_advban/autoban_advban.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the Autoban_advban module.
 */

/**
 * Implements hook_uninstall().
 */
function autoban_advban_uninstall() {

  // Delete autoban entities with advban provider.
  $storage = \Drupal::entityTypeManager()
    ->getStorage('autoban');
  $query = $storage
    ->getQuery();
  $query
    ->condition('provider', [
    'advban',
    'advban_range',
  ], 'IN');
  $entity_ids = $query
    ->execute();
  $entities = $storage
    ->loadMultiple($entity_ids);
  $storage
    ->delete($entities);
}

Functions

Namesort descending Description
autoban_advban_uninstall Implements hook_uninstall().