function hook_path_delete

Respond to a path being deleted.

Parameters

$path: An associative array containing the following keys:

  • source: The internal system path.
  • alias: The URL alias.
  • pid: Unique path alias identifier.
  • langcode: The language code of the alias.

See also

\Drupal\Core\Path\Path::delete()

Related topics

1 invocation of hook_path_delete()
Path::delete in drupal/core/lib/Drupal/Core/Path/Path.php
Deletes a URL alias.

File

drupal/core/modules/path/path.api.php, line 65
Hooks provided by the Path module.

Code

function hook_path_delete($path) {
  db_delete('mytable')
    ->condition('pid', $path['pid'])
    ->execute();
}