1 path.api.php hook_path_update($path)

Respond to a path being updated.

Parameters

$path: An associative array containing the following keys:

  • source: The internal system path.
  • alias: The URL alias.
  • pid: Unique URL alias identifier.
  • langcode: The language code of the alias.

See also

path_save()

Related topics

File

core/modules/path/path.api.php, line 72
Hooks provided by the Path module.

Code

function hook_path_update($path) {
  db_update('mytable')
    ->fields(array('alias' => $path['alias']))
    ->condition('pid', $path['pid'])
    ->execute();
}