Skip to content

Commit

Permalink
Merge pull request #23 from City-of-Helsinki/UHF-7938
Browse files Browse the repository at this point in the history
UHF-7938: Return null derivative id to skip translatable_menu_link_ur…
  • Loading branch information
tuutti authored Jan 13, 2023
2 parents c77baf3 + f3e0710 commit 98e3a83
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Plugin/Menu/ExternalMenuLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
*/
final class ExternalMenuLink extends MenuLinkBase {

/**
* {@inheritdoc}
*/
public function getDerivativeId() : ? string {
// External menu links share the plugin id with regular 'menu_link_content'
// links. Explicitly return NULL to skip the processing done in
// 'translatable_menu_link_uri_iterate_menu()' function.
return NULL;
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 98e3a83

Please sign in to comment.