Currently, when using a Form Mode to Create a new Bundle able Entity , the displayed Title is:

"Create" %bundle_id "as" %form_mode_label

This is confusing for non coders (Content Managers) because it does not match the Human readable Label (good) shown on the Title when editing and existing Entity.

I have a patch, that injects the 'entity_type.bundle.info' container into `\Drupal\form_mode_manager\Controller\FormModeManagerEntityController`and then creates all Route Controllers (factories) passing that into their constructors and then alters \Drupal\form_mode_manager\AbstractEntityFormModesFactory::pageTitle

Note: The way the Abstract Class is defined requires me to pass the same container, even for controllers that are not bundle aware. But it seems to be an overkill to have two different Abstract Classes, or override the Constructor for those who don't match. Also injecting a dependency does not seem to affect performance.

Comments

DiegoPino created an issue. See original summary.

diegopino’s picture

diegopino’s picture

Status: Active » Needs review
diegopino’s picture

Hi Folks. Anyone could give this a look please? Thanks a lot

dww’s picture

Status: Needs review » Closed (duplicate)
Parent issue: » #3069630: Page title is not translated

I believe this is the same bug as already reported at #3069630: Page title is not translated.

That issue has a much simpler patch that I believe would achieve the same result you're looking for here.

Would you be willing to test that out for your site and see if it works?

Thanks!
-Derek