You are here

function power_menu_token_list in Power Menu 6

Implementation of hook_token_list().

Parameters

$type:

File

./power_menu.module, line 633
This module provides some additional menu features. The features are not actually new, but are part of other modules. it's though very cumbersome to creating a new menu item, because one has to go to all the different places to configure these…

Code

function power_menu_token_list($type = 'all') {
  if ($type == 'node' || $type == 'all') {
    $pms = power_menu_get_pm_menus();
    foreach (array_filter($pms) as $pm) {
      $tokens['node']["power_menu_path_{$pm}-path"] = t("Path based on the power menu: %power_menu", array(
        '%power_menu' => $pm,
      ));
    }
    return $tokens;
  }
}