function hook_path_delete in Drupal 8
Same name and namespace in other branches
- 7 modules/path/path.api.php \hook_path_delete()
Respond to a path being deleted.
Parameters
array $path: The array structure is identical to that of the return value of \Drupal\Core\Path\AliasStorageInterface::save().
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use hook_path_alias_delete() instead.
See also
https://www.drupal.org/node/3013865
Related topics
1 function implements hook_path_delete()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- path_deprecated_test_path_delete in core/
modules/ system/ tests/ modules/ path_deprecated_test/ path_deprecated_test.module - Implements hook_path_delete().
File
- core/
modules/ path/ path.api.php, line 67 - Hooks provided by the Path module.
Code
function hook_path_delete($path) {
\Drupal::database()
->delete('mytable')
->condition('pid', $path['pid'])
->execute();
}