Menu links
At their most basic level, menu links are plugins, but this time discoverable via a YAML discovery (instead of annotations like we are used to). To this end, the regular menu links are defined inside a module_name.links.menu.yml file and can be altered by other modules by implementing hook_menu_links_discovered_alter(). When I say regular, I mean those links that take you to menus. We will see next that there are also a few other types.
One of the reasons for the YAML discovery is that links are more definition than functionality, so they don't necessarily require classes, but can be represented through some lines inside a YAML file.
There are some important classes you should check out in this architecture--MenuLinkManager (the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access