function domain_content_uninstall in Domain Access 8
Implements hook_uninstall().
File
- domain_content/
domain_content.install, line 49 - Install, update and uninstall hooks for this module.
Code
function domain_content_uninstall() {
$storage = \Drupal::entityTypeManager()
->getStorage('view');
$entities = [];
foreach ([
'affiliated_content',
'affiliated_editors',
] as $id) {
if ($view = $storage
->load($id)) {
$entities[$id] = $view;
}
}
if (!empty($entities)) {
$storage
->delete($entities);
}
}