ConfigEntityBundleBase - with API, how to get list of configured fields

Created on 4 November 2024, 5 months ago

I have a entity (@ConfigEntityType) that extends ConfigEntityBundleBase

With api, how to get a list of configured fields in interface ?

I tried

$entity_field_definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions('event_type', 'classic_form');

But I got this error

LogicException: Getting the base fields is not supported for entity type Event Type. in Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions() (line 225 of core/lib/Drupal/Core/Entity/EntityFieldManager.php).

💬 Support request
Status

Active

Version

10.3

Component

entity system

Created by

🇧🇪Belgium philalawst

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

Comments & Activities

Production build 0.71.5 2024