function views_view_delete
Same name in other branches
- 8.9.x core/modules/views/views.module \views_view_delete()
Implements hook_ENTITY_TYPE_delete().
File
-
core/
modules/ views/ views.module, line 817
Code
function views_view_delete(EntityInterface $entity) {
// Rebuild the routes in case there is a routed display.
$executable = Views::executableFactory()->get($entity);
$executable->initDisplay();
foreach ($executable->displayHandlers as $display) {
if ($display->getRoutedDisplay()) {
\Drupal::service('router.builder')->setRebuildNeeded();
break;
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.