mirror of
https://github.com/tag1consulting/d7_to_d10_migration.git
synced 2025-05-21 21:25:11 +00:00
Initial commit
This commit is contained in:
commit
c5e731d8ae
2773 changed files with 600767 additions and 0 deletions
drupal7/web/modules/path
73
drupal7/web/modules/path/path.api.php
Normal file
73
drupal7/web/modules/path/path.api.php
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Hooks provided by the Path module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup hooks
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Respond to a path being inserted.
|
||||
*
|
||||
* @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_insert($path) {
|
||||
db_insert('mytable')
|
||||
->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".
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue