refactor(menu): let every module declare its section of the main menu
The main menu of the theme and the tiles of the home page listed the sections
by hand — the news, the forum, the guestbook, the downloads, the library, the
members, the albums — linking to a module even when it was switched off, and
Counters, a class of the core, counted what was new in each. The theme and the
core knew every module that ships with the CMS.
Every module now declares its own line through MenuItemProviderInterface, with
a counter of what is new in it: unread topics of the forum, the entries of the
last day in the guestbook, new files, articles and photos, the members who
joined today. The panel and the chat of the administration go into the part of
the staff. The menu and the tiles draw what the switched-on modules declare,
and menu_counters(), the function of the templates that fed them, is gone. The
guestbook and the album gain the counts their lines need in their repositories.
The characterization tests keep every badge as it was. Two things change on
purpose: the home page has a tile for every section of the menu, the albums,
the help and the contacts among them, and the news are counted in the menu for
the same days as on the tile.
The labels move from the domain of the system to the domains of their modules,
with their translations where a module had none.
by hand — the news, the forum, the guestbook, the downloads, the library, the
members, the albums — linking to a module even when it was switched off, and
Counters, a class of the core, counted what was new in each. The theme and the
core knew every module that ships with the CMS.
Every module now declares its own line through MenuItemProviderInterface, with
a counter of what is new in it: unread topics of the forum, the entries of the
last day in the guestbook, new files, articles and photos, the members who
joined today. The panel and the chat of the administration go into the part of
the staff. The menu and the tiles draw what the switched-on modules declare,
and menu_counters(), the function of the templates that fed them, is gone. The
guestbook and the album gain the counts their lines need in their repositories.
The characterization tests keep every badge as it was. Two things change on
purpose: the home page has a tile for every section of the menu, the albums,
the help and the contacts among them, and the news are counted in the menu for
the same days as on the tile.
The labels move from the domain of the system to the domains of their modules,
with their translations where a module had none.