summaryrefslogtreecommitdiff
path: root/modules/path
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-02 00:22:20 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-02 00:22:20 +0000
commit1b8590856f54046e78c3c31c9304925655a46371 (patch)
treeae3933d403c38cacad2356bfef22231c75b107c8 /modules/path
parent27b8a3686ab18300d9a84d31332ae0efbbdf641d (diff)
downloadbrdo-1b8590856f54046e78c3c31c9304925655a46371.tar.gz
brdo-1b8590856f54046e78c3c31c9304925655a46371.tar.bz2
#929208 by heyrocker, duellj: Fixed Path hook api docs are missing function bodies
Diffstat (limited to 'modules/path')
-rw-r--r--modules/path/path.api.php43
1 files changed, 37 insertions, 6 deletions
diff --git a/modules/path/path.api.php b/modules/path/path.api.php
index 3dd82940e..54a5c006b 100644
--- a/modules/path/path.api.php
+++ b/modules/path/path.api.php
@@ -13,30 +13,61 @@
/**
- * The path has been inserted.
+ * Allow modules to respond to a path being inserted.
*
* @param $path
- * The path array.
+ * 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_insert($path) {
+ db_insert('mytable')
+ ->fields(array(
+ 'alias' => $path['alias'],
+ 'pid' => $path['pid'],
+ ))
+ ->execute();
}
/**
- * The path has been updated.
+ * Allow modules to respond to a path being updated.
*
* @param $path
- * The path array.
+ * 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();
}
/**
- * The path has been deleted.
+ * Allow modules to respond to a path being deleted.
*
* @param $path
- * The path array.
+ * 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();
}
/**