public function PathPluginBase::remove in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::remove()
Reacts on deleting a display.
Overrides DisplayPluginBase::remove
File
- core/
modules/ views/ src/ Plugin/ views/ display/ PathPluginBase.php, line 565
Class
- PathPluginBase
- The base display plugin for path/callbacks. This is used for pages and feeds.
Namespace
Drupal\views\Plugin\views\displayCode
public function remove() {
$menu_links = $this
->getMenuLinks();
/** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
$menu_link_manager = \Drupal::service('plugin.manager.menu.link');
foreach ($menu_links as $menu_link_id => $menu_link) {
$menu_link_manager
->removeDefinition("views_view:{$menu_link_id}");
}
}