function menu_link_content_path_alias_update

Same name in other branches
  1. 9 core/modules/menu_link_content/menu_link_content.module \menu_link_content_path_alias_update()
  2. 8.9.x core/modules/menu_link_content/menu_link_content.module \menu_link_content_path_alias_update()
  3. 10 core/modules/menu_link_content/menu_link_content.module \menu_link_content_path_alias_update()

Implements hook_ENTITY_TYPE_update() for 'path_alias'.

File

core/modules/menu_link_content/menu_link_content.module, line 81

Code

function menu_link_content_path_alias_update(PathAliasInterface $path_alias) {
    if ($path_alias->getAlias() != $path_alias->original
        ->getAlias()) {
        _menu_link_content_update_path_alias($path_alias->getAlias());
        _menu_link_content_update_path_alias($path_alias->original
            ->getAlias());
    }
    elseif ($path_alias->getPath() != $path_alias->original
        ->getPath()) {
        _menu_link_content_update_path_alias($path_alias->getAlias());
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.