autoban_ban.install in Automatic IP ban (Autoban) 8
Install, update and uninstall functions for the Autoban_ban module.
File
modules/autoban_ban/autoban_ban.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Autoban_ban module.
*/
/**
* Implements hook_uninstall().
*/
function autoban_ban_uninstall() {
// Delete autoban entities with ban provider.
$storage = \Drupal::entityTypeManager()
->getStorage('autoban');
$query = $storage
->getQuery();
$query
->condition('provider', 'ban');
$entity_ids = $query
->execute();
$entities = $storage
->loadMultiple($entity_ids);
$storage
->delete($entities);
}
Functions
Name | Description |
---|---|
autoban_ban_uninstall | Implements hook_uninstall(). |