Add a hook_ENTITY_TYPE_form_mode_alter()

Created on 5 February 2024, 11 months ago
Updated 4 May 2024, 8 months ago

Problem/Motivation

Since we have a confirmation on hook_ENTITY_TYPE_view_mode_alter() → , it is reasonable (and consistent) to add the hook_ENTITY_TYPE_form_mode_alter() as well.

Upon examining \Drupal\Core\Entity\Entity\EntityFormDisplay::collectRenderDisplay#L90 we can observe that the entity_form_mode hooks are only invoked, confirming that the desired hook does not exist.

Steps to reproduce

N/A

Proposed resolution

Add the new hook.

Remaining tasks

User interface changes

N/A

API changes

Introducing a new entity hook named hook_ENTITY_TYPE_form_mode_alter() to "Change the form mode of a specific entity type for building an entity form."

Data model changes

N/A

Release notes snippet

TBD

✨ Feature request
Status

Fixed

Version

10.3 ✨

Component
Entity  →

Last updated about 17 hours ago

  • Maintained by
  • 🇬🇧United Kingdom @catch
  • 🇨🇭Switzerland @berdir
  • 🇩🇪Germany @hchonov
Created by

🇭🇺Hungary balintpekker Budapest, Hungary

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024