[PP-1] Provide a "add" link template for the block_content_type entity type

Created on 4 November 2022, over 1 year ago
Updated 21 December 2023, 5 months ago

Problem/Motivation

Noticed this while reviewing πŸ“Œ Move custom block types admin link to admin/structure Fixed .

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 πŸ“Œ Support route aliasing (Symfony 5.4) and allow deprecating the route name Needs work to be committed, so postponing on that issue.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Closed: duplicate

Version

11.0 πŸ”₯

Component
Block contentΒ  β†’

Last updated 22 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom AaronMcHale Edinburgh, Scotland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024