Commit f76df171 authored by adriancid's avatar adriancid

Issue #2958415 by adriancid, romainj, Prashant.c, harshita29: Replace usages...

Issue #2958415 by adriancid, romainj, Prashant.c, harshita29: Replace usages of the deprecated drupal_set_message() function
parent 7c29d381
......@@ -2,6 +2,8 @@ Admin Toolbar 8.x-1.25, 2018-XX-XX
----------------------------------
Changes since 8.x-1.24:
- #2958415 by adriancid, romainj, Prashant.c, harshita29: Replace usages of the
deprecated drupal_set_message() function.
- #2996485 by idebr, adriancid: Remove unused function
admin_toolbar_tools_get_links().
- #2989281 by JKerschner, adriancid: Consistently use $entityTypeManager.
......
......@@ -7,4 +7,4 @@ core: 8.x
dependencies:
- admin_toolbar:admin_toolbar
- drupal:system (>=8.3)
- drupal:system (>=8.5)
......@@ -34,6 +34,6 @@
},
"require": {
"drupal/admin_toolbar": "^1",
"drupal/core": "~8.3"
"drupal/core": "~8.5"
}
}
......@@ -162,8 +162,8 @@ class ToolbarController extends ControllerBase {
* Flushes all caches.
*/
public function flushAll() {
$this->messenger()->addMessage($this->t('All caches cleared.'));
drupal_flush_all_caches();
drupal_set_message($this->t('All caches cleared.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -173,7 +173,7 @@ class ToolbarController extends ControllerBase {
public function flushJsCss() {
$this->state()
->set('system.css_js_query_string', base_convert($this->time->getCurrentTime(), 10, 36));
drupal_set_message($this->t('CSS and JavaScript cache cleared.'));
$this->messenger()->addMessage($this->t('CSS and JavaScript cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -182,7 +182,7 @@ class ToolbarController extends ControllerBase {
*/
public function flushPlugins() {
$this->pluginCacheClearer->clearCachedDefinitions();
drupal_set_message($this->t('Plugins cache cleared.'));
$this->messenger()->addMessage($this->t('Plugins cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -191,7 +191,7 @@ class ToolbarController extends ControllerBase {
*/
public function flushStatic() {
drupal_static_reset();
drupal_set_message($this->t('Static cache cleared.'));
$this->messenger()->addMessage($this->t('Static cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -204,7 +204,7 @@ class ToolbarController extends ControllerBase {
$this->contextualLinkManager->clearCachedDefinitions();
$this->localTaskLinkManager->clearCachedDefinitions();
$this->localActionLinkManager->clearCachedDefinitions();
drupal_set_message($this->t('Routing and links cache cleared.'));
$this->messenger()->addMessage($this->t('Routing and links cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -213,7 +213,7 @@ class ToolbarController extends ControllerBase {
*/
public function flushViews() {
views_invalidate_cache();
drupal_set_message($this->t('Views cache cleared.'));
$this->messenger()->addMessage($this->t('Views cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -224,7 +224,7 @@ class ToolbarController extends ControllerBase {
// @todo Update once Drupal 8.6 will be released.
// @see https://www.drupal.org/node/2908461
PhpStorageFactory::get('twig')->deleteAll();
drupal_set_message($this->t('Twig cache cleared.'));
$this->messenger()->addMessage($this->t('Twig cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -233,7 +233,7 @@ class ToolbarController extends ControllerBase {
*/
public function runCron() {
$this->cron->run();
drupal_set_message($this->t('Cron ran successfully.'));
$this->messenger()->addMessage($this->t('Cron ran successfully.'));
return new RedirectResponse($this->reloadPage());
}
......@@ -242,7 +242,7 @@ class ToolbarController extends ControllerBase {
*/
public function cacheRender() {
$this->cacheRender->invalidateAll();
drupal_set_message($this->t('Render cache cleared.'));
$this->messenger()->addMessage($this->t('Render cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment