You are here

public function ImageFieldFormatter::__construct in Entity Embed 8

Constructs an ImageFieldFormatter object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity manager service.

\Drupal\Core\Field\FormatterPluginManager $formatter_plugin_manager: The field formatter plugin manager.

\Drupal\Core\TypedData\TypedDataManager $typed_data_manager: The typed data manager.

\Drupal\Core\Image\ImageFactory $image_factory: The image factory.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

Overrides EntityReferenceFieldFormatter::__construct

File

src/Plugin/entity_embed/EntityEmbedDisplay/ImageFieldFormatter.php, line 68

Class

ImageFieldFormatter
Entity Embed Display reusing image field formatters.

Namespace

Drupal\entity_embed\Plugin\entity_embed\EntityEmbedDisplay

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, FormatterPluginManager $formatter_plugin_manager, TypedDataManager $typed_data_manager, ImageFactory $image_factory, LanguageManagerInterface $language_manager, MessengerInterface $messenger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $formatter_plugin_manager, $typed_data_manager, $language_manager);
  $this->imageFactory = $image_factory;
  $this->messenger = $messenger;
}