Skip to content

Instantly share code, notes, and snippets.

@suresh-kumara-gist
Created November 18, 2017 07:19
Show Gist options
  • Save suresh-kumara-gist/2c8c296978a1d4e266d07eb1792cd026 to your computer and use it in GitHub Desktop.
Save suresh-kumara-gist/2c8c296978a1d4e266d07eb1792cd026 to your computer and use it in GitHub Desktop.
delete menu items.
ini_set('memory_limit','3000M');
// replace menu_name "main" to some other menu
entity_delete_multiple('menu_link_content', \Drupal::entityQuery('menu_link_content')
->condition("menu_name", "main", "=")->execute());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment