You are here

public function EntityReferenceFieldFormatter::__construct in Entity Embed 8

Constructs a new EntityReferenceFieldFormatter.

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 type 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\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Config\ConfigFactoryInterface|null $config_factory: The configuration factory, or null to get from global container for backwards compatibility.

Overrides FieldFormatterEntityEmbedDisplayBase::__construct

1 call to EntityReferenceFieldFormatter::__construct()
ImageFieldFormatter::__construct in src/Plugin/entity_embed/EntityEmbedDisplay/ImageFieldFormatter.php
Constructs an ImageFieldFormatter object.
1 method overrides EntityReferenceFieldFormatter::__construct()
ImageFieldFormatter::__construct in src/Plugin/entity_embed/EntityEmbedDisplay/ImageFieldFormatter.php
Constructs an ImageFieldFormatter object.

File

src/Plugin/entity_embed/EntityEmbedDisplay/EntityReferenceFieldFormatter.php, line 59

Class

EntityReferenceFieldFormatter
Entity Embed Display reusing entity reference 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, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory = NULL) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $formatter_plugin_manager, $typed_data_manager, $language_manager);
  $this->configFactory = $config_factory instanceof ConfigFactoryInterface ? $config_factory : \Drupal::configFactory();
}