In this recipe, we specified the message collection route as /admin/content/messages. Without implementing this route as a local task under the /admin/content route, it will not show up as a tab. This can be done by creating a links.task.yml file for the module.
In mymodule.links.task.yml, add the following YAML content:
entity.message.collection_tab: route_name: entity.message.collection base_route: system.admin_content title: 'Messages'
This instructs Drupal to use the entity.message.collection route, defined in our routing.yml file, to be based under the system.admin_content route:
