Define typed_data support in enum-related PropType plugin definition

Created on 21 November 2024, about 1 month ago

Problem/Motivation

Currently it is not possible to e.g. use List (Text) Drupal fields for Data from a field source plugin on enum*-related component properties.
While checking the PropType plugins, I saw, that the enum* plugins do not have their supported typed_data values defined.

Steps to reproduce

  • Define a component with a property of any enum* type
  • Use that component on an entity with a List (text) field (or even List (integer) or List (float)) and try to set the component's enum property value with the Data from a field source plugin -> the list field(s) are not available

Proposed resolution

  • Add string, number, integer as supported types to typed_data definition values on enum* source plugins
  • Ensure that potential field values, that are missing in the component's enum-definition do not result in fatal errors during property validation (e.g. silently remove that value, if it does not exist in the component's property definition)

Remaining tasks

  • Create issue fork and MR to fix this issue
  • Decide how field values should be handled, when not available in component's property definition, to avoid fatal errors form property validator

User interface changes

n/a

API changes

  • enum* PropType plugins will have string, integer, number entries in their typed_data definition value

Data model changes

n/a

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany hctom

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