function hook_path_update

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 path alias identifier.
  • language: The language of the alias.

See also

path_save()

Related topics

2 string references to 'hook_path_update'
PathSaveTest::testDrupalSaveOriginalPath in drupal-7.x/modules/simpletest/tests/path.test
Tests that path_save() makes the original path available to modules.
path_test_path_update in drupal-7.x/modules/simpletest/tests/path_test.module
Implements hook_path_update().
1 function implements hook_path_update()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

path_test_path_update in drupal-7.x/modules/simpletest/tests/path_test.module
Implements hook_path_update().
1 invocation of hook_path_update()
path_save in drupal-7.x/includes/path.inc
Save a path alias to the database.

Archivo

drupal-7.x/modules/path/path.api.php, line 46
Hooks provided by the Path module.

Código

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