_menu_link_map_translate

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 _menu_link_map_translate(&$map, $to_arg_functions)

This function translates the path elements in the map using any to_arg helper function. These functions take an argument and return an object. See http://drupal.org/node/109153 for more information.

Übergabeparameter

map An array of path arguments (ex: array('node', '5'))

$to_arg_functions An array of helper function (ex: array(2 => 'menu_tail_to_arg'))

Verwandte Themen

▾ 2 functions call _menu_link_map_translate()

_menu_link_translate in includes/menu.inc
This function is similar to _menu_translate() but does link-specific preparation such as always calling to_arg functions.
_menu_translate in includes/menu.inc
Handles dynamic path translation and menu access control.

Code

includes/menu.inc, line 601

<?php
function _menu_link_map_translate(&$map, $to_arg_functions) {
  if ($to_arg_functions) {
    $to_arg_functions = unserialize($to_arg_functions);
    foreach ($to_arg_functions as $index => $function) {
      // Translate place-holders into real values.
      $arg = $function(!empty($map[$index]) ? $map[$index] : '', $map, $index);
      if (!empty($map[$index]) || isset($arg)) {
        $map[$index] = $arg;
      }
      else {
        unset($map[$index]);
      }
    }
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen