function popup_onload_statistics_entity_delete in Popup On Load 8
Same name and namespace in other branches
- 7 popup_onload_statistics/popup_onload_statistics.module \popup_onload_statistics_entity_delete()
Implements hook_entity_delete().
File
- modules/
popup_onload_statistics/ popup_onload_statistics.module, line 25 - Main popup on loadvertisement statistics functions.
Code
function popup_onload_statistics_entity_delete($entity, $type) {
if ($type == 'popup_onload') {
// TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
// You will need to use `\Drupal\core\Database\Database::getConnection()` if you do not yet have access to the container here.
\Drupal::database()
->delete('popup_onload_statistics')
->condition('popup_id', $entity->popup_id)
->execute();
}
}