function Menu::save
Same name in other branches
- 9 core/modules/system/src/Entity/Menu.php \Drupal\system\Entity\Menu::save()
- 8.9.x core/modules/system/src/Entity/Menu.php \Drupal\system\Entity\Menu::save()
- 10 core/modules/system/src/Entity/Menu.php \Drupal\system\Entity\Menu::save()
Overrides ConfigEntityBase::save
File
-
core/
modules/ system/ src/ Entity/ Menu.php, line 99
Class
- Menu
- Defines the Menu configuration entity class.
Namespace
Drupal\system\EntityCode
public function save() {
$return = parent::save();
\Drupal::cache('menu')->invalidateAll();
// Invalidate the block cache to update menu-based derivatives.
if (\Drupal::moduleHandler()->moduleExists('block')) {
\Drupal::service('plugin.manager.block')->clearCachedDefinitions();
}
return $return;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.