You are here

function menu_token_find_link_path in Menu Token 7

Find a link path based on a router path.

Parameters

$router_path:

Return value

The link path.

1 call to menu_token_find_link_path()
menu_token_query_alter in ./menu_token.module
Implements hook_query_alter().

File

./menu_token.module, line 202
Main module file for the Menu Token module.

Code

function menu_token_find_link_path($router_path) {
  $query = db_select('menu_links', 'ml');
  $query
    ->fields('ml', array(
    'link_path',
  ))
    ->condition('ml.router_path', 'menutoken/%')
    ->condition('ml.options', '%' . db_like("\"{$router_path}\"") . '%', 'LIKE');
  $link_path = $query
    ->execute()
    ->fetchField();
  return $link_path;
}