diff -r 07239de796bb -r e756a8c72c3d cms/drupal/modules/path/path.api.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/drupal/modules/path/path.api.php Fri Sep 08 12:04:06 2017 +0200 @@ -0,0 +1,73 @@ +fields(array( + 'alias' => $path['alias'], + 'pid' => $path['pid'], + )) + ->execute(); +} + +/** + * Respond to a path being updated. + * + * @param $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 path_save() + */ +function hook_path_update($path) { + db_update('mytable') + ->fields(array('alias' => $path['alias'])) + ->condition('pid', $path['pid']) + ->execute(); +} + +/** + * Respond to a path being deleted. + * + * @param $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 path_delete() + */ +function hook_path_delete($path) { + db_delete('mytable') + ->condition('pid', $path['pid']) + ->execute(); +} + +/** + * @} End of "addtogroup hooks". + */