Drupal 8 Menu always show as expanded I'd like to have a menu show as expanded regardless of whether it is checked or not in the UI (or always checked when a new menu item is created by a user)

I have been looking at hook_menu_links_discovered_alter

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21menu.api.php/function/hook_menu_links_discovered_alter/8.1.x


  expanded: (optional) If set to TRUE, and if a menu link is provided
  for this menu item (as a result of other properties), then the menu
  link is always expanded, equivalent to its 'always expanded' checkbox
  being set in the UI.


How could I implement this?
If you are placing the menu in a block for display, check out the Menu Block module https://www.drupal.org/project/menu_block it has an option to expand all menu links.