- Issue created by @joewickert
- 🇬🇧United Kingdom tonyhrx
The dependency for the entity display repository service is not being assigned to a class property. Here's a patch.
--- a/CivicrmEntityAddressLeafletMap.php +++ b/CivicrmEntityAddressLeafletMap.php @@ -38,6 +38,13 @@ class CivicrmEntityAddressLeafletMap extends LeafletMap implements ContainerFactor */ class CivicrmEntityAddressLeafletMap extends LeafletMap implements ContainerFactoryPluginInterface { + /** + * The entity display repository. + * + * @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface + */ + protected $entityDisplay; + /** * {@inheritdoc} */ @@ -56,7 +63,10 @@ class CivicrmEntityAddressLeafletMap extends LeafletMap implements ContainerFactor $container->get('link_generator'), $container->get('plugin.manager.field.field_type') ); - return new self( + + // Assign the entity display repository service to the class property + $instance->entityDisplay = $container->get('entity_display.repository'); + + return $instance; }