function path_entity_translation_delete
path_entity_translation_delete(EntityInterface $translation)
Implements hook_entity_translation_delete().
File
- core/modules/path/path.module, line 84
- Enables users to rename URLs.
Code
function path_entity_translation_delete(EntityInterface $translation) { if ($translation->hasLinkTemplate('canonical')) { $path = $translation->urlInfo()->getInternalPath(); $conditions = array('source' => '/' . $path, 'langcode' => $translation->language()->getId()); \Drupal::service('path.alias_storage')->delete($conditions); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!path!path.module/function/path_entity_translation_delete/8.1.x