You are here

public function TokenCommands::cacheClear in Token 8

Adds a cache clear option for tokens.

@hook on-event cache-clear

Parameters

array $types: The Drush clear types to make available.

bool $includeBootstrappedTypes: Whether to include types only available in a bootstrapped Drupal or not.

File

src/Commands/TokenCommands.php, line 40

Class

TokenCommands
TokenCommands provides the Drush hook implementation for cache clears.

Namespace

Drupal\token\Commands

Code

public function cacheClear(array &$types, $includeBootstrappedTypes) {
  if (!$includeBootstrappedTypes || !$this->moduleHandler
    ->moduleExists('token')) {
    return;
  }
  $types['token'] = 'token_clear_cache';
}