function drush_devel_token in Devel 8.3
Same name and namespace in other branches
- 8 drush/devel.drush8.inc \drush_devel_token()
- 8.2 drush/devel.drush8.inc \drush_devel_token()
- 6 devel.drush.inc \drush_devel_token()
- 7 devel.drush.inc \drush_devel_token()
Command callback. List available tokens.
File
- drush/
devel.drush8.inc, line 206 - This file is only used by Drush8.
Code
function drush_devel_token() {
$rows[] = [
dt('Group'),
dt('Token'),
dt('Name'),
];
$all = \Drupal::token()
->getInfo();
foreach ($all['tokens'] as $group => $tokens) {
foreach ($tokens as $key => $token) {
$rows[] = [
$group,
$key,
$token['name'],
];
}
}
drush_print_table($rows, TRUE);
}