function Menu::delete
Overrides EntityBase::delete
File
-
core/
modules/ system/ src/ Entity/ Menu.php, line 112
Class
- Menu
- Defines the Menu configuration entity class.
Namespace
Drupal\system\EntityCode
public function delete() {
parent::delete();
\Drupal::cache('menu')->invalidateAll();
// Invalidate the block cache to update menu-based derivatives.
if (\Drupal::moduleHandler()->moduleExists('block')) {
\Drupal::service('plugin.manager.block')->clearCachedDefinitions();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.