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.installView 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
Name | Description |
---|---|
autoban_advban_uninstall | Implements hook_uninstall(). |