You are here

autoban.install in Automatic IP ban (Autoban) 8

Same filename and directory in other branches
  1. 7 autoban.install

Install, update and uninstall functions for the Autoban module.

File

autoban.install
View source
<?php

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

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

  // Delete all autoban entities.
  $storage = \Drupal::entityTypeManager()
    ->getStorage('autoban');
  $query = $storage
    ->getQuery();
  $entity_ids = $query
    ->execute();
  $entities = $storage
    ->loadMultiple($entity_ids);
  $storage
    ->delete($entities);

  // Delete autoban config settings.
  \Drupal::configFactory()
    ->getEditable('autoban.settings')
    ->delete();
}

Functions

Namesort descending Description
autoban_uninstall Implements hook_uninstall().