Problem/Motivation

Noticed this while reviewing #2987964: Move custom block types admin link to admin/structure.

The block_content_type Entity Type does not provide an add link template in its entity type annotation:

 *   links = {
 *     "delete-form" = "/admin/structure/block/block-content/manage/{block_content_type}/delete",
 *     "edit-form" = "/admin/structure/block/block-content/manage/{block_content_type}",
 *     "entity-permissions-form" = "/admin/structure/block/block-content/manage/{block_content_type}/permissions",
 *     "collection" = "/admin/structure/block/block-content/types",
 *   },

Currently, the add route is provided in block_content.routing.yml and the route name does not follow the established pattern, block_content.type_add where it should be entity.block_content_type.add.

Proposed resolution

Provide a add link template in the block_content_type entity annotation.

Since block_content_type already uses the AdminHtmlRouteProvider this will automatically generate the entity.block_content_type.add route.

The block_content.type_add route can then be deprecated, this requires #3159210: Support route aliasing (Symfony 5.4) and allow deprecating the route name to be committed, so postponing on that issue.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

AaronMcHale created an issue. See original summary.

aaronmchale’s picture

Issue summary: View changes

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture