function MenuLinkContentHooks::pathAliasUpdate
Implements hook_ENTITY_TYPE_update() for 'path_alias'.
File
-
core/
modules/ menu_link_content/ src/ Hook/ MenuLinkContentHooks.php, line 75
Class
- MenuLinkContentHooks
- Hook implementations for menu_link_content.
Namespace
Drupal\menu_link_content\HookCode
public function pathAliasUpdate(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.