diff --git a/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php b/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php index e304f31f4d936c6cade762e8fcbc8bb728fdae09..a99ff5c257a70dc2e6e54b95e4a75a595b179902 100644 --- a/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php +++ b/src/Plugin/MenuItemsFormat/NestedMenuItemsFormat.php @@ -252,6 +252,11 @@ class NestedMenuItemsFormat extends MenuItemsFormatBase implements ContainerFact $field = $menuLinkContentEntity->get($key); $normalization = $this->serializer->normalize($field, 'api_json', ['resource_object' => $resourceObject]); $data[$key] = $normalization->getNormalization(); + /** @var \Drupal\Core\Entity\EntityInterface $entity */ + if ($entity = $field->entity) { + $data[$key]['type'] = $entity->getEntityTypeId() . '--' . $entity->bundle(); + $data[$key]['id'] = $entity->uuid(); + } } } }