On this page
function hook_path_insert
hook_path_insert($path)
Respond to a path being inserted.
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
Related topics
File
- modules/path/path.api.php, line 25
- Hooks provided by the Path module.
Code
function hook_path_insert($path) {
db_insert('mytable')
->fields(array(
'alias' => $path['alias'],
'pid' => $path['pid'],
))
->execute();
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!path!path.api.php/function/hook_path_insert/7.x