Add statistics page showing redirect preference usage counts
Closes #3570991
Added a "Statistics" page as a tab next to the settings page. The page displays a table showing:
- Route label
- Route path
- Number of users with that preference
It also shows:
- Deleted routes (routes in user data but no longer in config) - helps detect broken settings
- Users with no preference set (using default)
Changes made
- Added
src/Controller/StatisticsController.php- Controller that queries theusers_datatable and builds the statistics table - Updated
user_preference_login_redirect.routing.yml- Added route for/admin/config/people/user-preference-login-redirect/statistics - Updated
user_preference_login_redirect.links.task.yml- Added tab link to settings page - Updated
tests/src/Functional/UserPreferenceLoginRedirectTest.php- Added tests for statistics page