Created
February 3, 2018 10:52
-
-
Save suresh-kumara-gist/bc8bb169fc7d7b170c6a19301966c116 to your computer and use it in GitHub Desktop.
menu link delete by nid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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