autoban.install in Automatic IP ban (Autoban) 8
Same filename and directory in other branches
Install, update and uninstall functions for the Autoban module.
File
autoban.installView 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
Name | Description |
---|---|
autoban_uninstall | Implements hook_uninstall(). |