Currently, the module's code base has a quite a lot of @todo comments in comparison to its overall size. One of them was recently introduced in #2829544: Filter empty system admin menu block pages, where some route names were hardcoded to be removed, if there are no children left. This needs to be solved in a generic way that hopefully also removes to whole "admin/config" link from the menu's first level, if there are no children left.

As stated in the other issue, the route names where chosen based on their callback to SystemController::systemAdminMenuBlockPage(). We should load the routes and check for their page callbacks.

Comments

agoradesign created an issue. See original summary.

agoradesign’s picture

Status: Active » Fixed

Refactored the code a little bit, moving away from checking against known route names towards to checking against known Controller callbacks that deliver admin overview pages only, so that every future route based on \Drupal\system\Controller\SystemController::systemAdminMenuBlockPage() is included automatically. Added two additional controllers with the nice side effect, that know the "configuration" parent link will also be unset, if there are no children left :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.