22 private $objectManager;
27 private $metadataPool;
39 $this->metadataPool = $metadataPool;
52 $metadata = $this->metadataPool->getMetadata(
$entityType);
53 foreach ($metadata->getEntityContext() as $contextProviderClass) {
54 $contextProvider = $this->objectManager->get($contextProviderClass);
58 'The configuration for the "%1" type is incorrect. ' 59 .
'Verify the type and configuration and try again.',
64 $entityContext[] = $contextProvider->getContext(
$entityType, $entityData);
66 return $entityContext;
getEntityContext($entityType, $entityData=[])
__construct(ObjectManagerInterface $objectManager, MetadataPool $metadataPool)