path_entity_translation_delete

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($conditio