You are here

public function ToolbarController::flushPlugins in Admin Toolbar 8.2

Same name and namespace in other branches
  1. 8 admin_toolbar_tools/src/Controller/ToolbarController.php \Drupal\admin_toolbar_tools\Controller\ToolbarController::flushPlugins()
  2. 3.x admin_toolbar_tools/src/Controller/ToolbarController.php \Drupal\admin_toolbar_tools\Controller\ToolbarController::flushPlugins()

Flushes plugins caches.

1 string reference to 'ToolbarController::flushPlugins'
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 222

Class

ToolbarController
Class ToolbarController.

Namespace

Drupal\admin_toolbar_tools\Controller

Code

public function flushPlugins() {
  $this->pluginCacheClearer
    ->clearCachedDefinitions();
  $this
    ->messenger()
    ->addMessage($this
    ->t('Plugins cache cleared.'));
  return new RedirectResponse($this
    ->reloadPage());
}