function hook_path_update in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/path/path.api.php \hook_path_update()
Respond to a path being updated.
Parameters
array $path: The array structure is identical to that of the return value of \Drupal\Core\Path\PathInterface::save().
See also
\Drupal\Core\Path\PathInterface::save()
Related topics
3 functions implement 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.
- menu_link_content_path_update in core/
modules/ menu_link_content/ menu_link_content.module - Implements hook_path_update().
- path_test_path_update in core/
modules/ system/ tests/ modules/ path_test/ path_test.module - Implements hook_path_update().
- system_path_update in core/
modules/ system/ system.module - Implements hook_path_update().
File
- core/
modules/ path/ path.api.php, line 40 - Hooks provided by the Path module.
Code
function hook_path_update($path) {
if ($path['alias'] != $path['original']['alias']) {
db_update('mytable')
->fields(array(
'alias' => $path['alias'],
))
->condition('pid', $path['pid'])
->execute();
}
}