Override getReferenceableBundles() method

Created on 18 October 2023, about 1 year ago
Updated 25 October 2023, about 1 year ago

Issue summary

Since this issue πŸ› ResourceTypeRepository wrongly assumes that all entity reference fields have the setting "target_type" Fixed has been fixed, DynamicEntityReferenceItem now has a static method getReferenceableBundles() that doesn't work as-is because parent implementation requires field to have a 'target_type' setting which dynamic item does not.

Any code that will rely on DynamicEntityReferenceItem having that method won't work.

Proposed resolution

getReferenceableBundles() needs to be overridden to use \Drupal\dynamic_entity_reference\Plugin\Field\FieldType\DynamicEntityReferenceItem::getTargetTypes correctly instead.

πŸ“Œ Task
Status

Closed: duplicate

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine solariel

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

Comments & Activities

Production build 0.71.5 2024