hook_path_delete

hook_path_delete($path)

Respond to a path being deleted.

Parameters

array $path: The array structure is identical to that of the return value of \Drupal\Core\Path\PathInterface::save().

See also

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

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

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

Code

1
2
3
4
5
function hook_path_delete($path) {
  db_delete('mytable')
    ->condition('pid', $path['pid'])
    ->execute();
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.