public function ToolbarController::flushMenu in Admin Toolbar 8.2
Same name and namespace in other branches
- 8 admin_toolbar_tools/src/Controller/ToolbarController.php \Drupal\admin_toolbar_tools\Controller\ToolbarController::flushMenu()
- 3.x admin_toolbar_tools/src/Controller/ToolbarController.php \Drupal\admin_toolbar_tools\Controller\ToolbarController::flushMenu()
Clears all cached menu data.
1 string reference to 'ToolbarController::flushMenu'
- admin_toolbar_tools.routing.yml in admin_toolbar_tools/
admin_toolbar_tools.routing.yml - admin_toolbar_tools/admin_toolbar_tools.routing.yml
File
- admin_toolbar_tools/
src/ Controller/ ToolbarController.php, line 240
Class
- ToolbarController
- Class ToolbarController.
Namespace
Drupal\admin_toolbar_tools\ControllerCode
public function flushMenu() {
$this->cacheMenu
->invalidateAll();
$this->menuLinkManager
->rebuild();
$this->contextualLinkManager
->clearCachedDefinitions();
$this->localTaskLinkManager
->clearCachedDefinitions();
$this->localActionLinkManager
->clearCachedDefinitions();
$this
->messenger()
->addMessage($this
->t('Routing and links cache cleared.'));
return new RedirectResponse($this
->reloadPage());
}