I have a script where I instantiate and fill menus with menu items programmatically.
Whats the best way to check if a menu already exists if I already know it's ID.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
A menu is a config entity, which means you can use standard entity API to load it.
\Drupal\system\Entity\Menu::load() or \Drupal:entityTypeManager()->getStorage('menu')->load()