Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suresh-kumara-gist/bc8bb169fc7d7b170c6a19301966c116 to your computer and use it in GitHub Desktop.
Save suresh-kumara-gist/bc8bb169fc7d7b170c6a19301966c116 to your computer and use it in GitHub Desktop.
menu link delete by nid
$menu = \Drupal::entityTypeManager()
->getStorage('menu_link_content')
->loadByProperties([
'menu_name' => ['agile-central-menu'],
'link.uri' => [ "entity:node/960"]
]);
If ($menu ) {
$menu->delete();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment