function views_view_delete
views_view_delete(EntityInterface $entity)
Implements hook_ENTITY_TYPE_delete().
File
- core/modules/views/views.module, line 820
- Primarily Drupal hooks and global API functions to manipulate views.
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; } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!views!views.module/function/views_view_delete/8.1.x