You are here

public function MediaTypeBase::__construct in Media entity 8

Constructs a new class instance.

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: Entity type manager service.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: Entity field manager service.

\Drupal\Core\Config\Config $config: Media entity config object.

Overrides PluginBase::__construct

File

src/MediaTypeBase.php, line 65

Class

MediaTypeBase
Base implementation of media type plugin.

Namespace

Drupal\media_entity

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, Config $config) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_type_manager;
  $this->entityFieldManager = $entity_field_manager;
  $this->config = $config;
  $this
    ->setConfiguration($configuration);
}