You are here

function drush_devel_token in Devel 6

Same name and namespace in other branches
  1. 8.3 drush/devel.drush8.inc \drush_devel_token()
  2. 8 drush/devel.drush8.inc \drush_devel_token()
  3. 8.2 drush/devel.drush8.inc \drush_devel_token()
  4. 7 devel.drush.inc \drush_devel_token()

Command callback. List available tokens.

File

./devel.drush.inc, line 154
Drush integration for the devel module.

Code

function drush_devel_token() {
  $rows[] = array(
    dt('Group'),
    dt('Token'),
    dt('Name'),
  );
  $all = token_info();
  foreach ($all['tokens'] as $group => $tokens) {
    foreach ($tokens as $key => $token) {
      $rows[] = array(
        $group,
        $key,
        $token['name'],
      );
    }
  }
  drush_print_table($rows, TRUE);
}