Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / token / src / Controller / TokenCacheController.php
1 <?php
2
3 namespace Drupal\token\Controller;
4
5 use Drupal\Core\Controller\ControllerBase;
6
7 /**
8  * Clears cache for tokens.
9  */
10 class TokenCacheController extends ControllerBase {
11
12   /**
13    * Clear caches and redirect back to the frontpage.
14    */
15   public function flush() {
16     token_clear_cache();
17     $this->messenger()->addMessage($this->t('Token registry caches cleared.'));
18     return $this->redirect('<front>');
19   }
20
21 }