Problem/Motivation
First reported in #2977669: Spec Compliance: some entity types have an "id", "type" or "uuid" field, this violates the spec.
This makes it impossible to expose the relationship between MenuLinkContent
and Menu
entities:
$fields['menu_name'] = BaseFieldDefinition::create('string')
->setLabel(t('Menu name'))
->setDescription(t('The menu name. All links with the same menu name (such as "tools") are part of the same menu.'))
->setDefaultValue('tools')
->setSetting('is_ascii', TRUE);
Proposed resolution
$fields['menu'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Menu'))
->setDescription(t('The menu this link is part of.');
Remaining tasks
TBD
User interface changes
TBd
API changes
TBD
Data model changes
Yes!