You are here

public function VideoEmbedField::__construct in Video Embed Field 8.2

Same name in this branch
  1. 8.2 src/Plugin/Field/FieldType/VideoEmbedField.php \Drupal\video_embed_field\Plugin\Field\FieldType\VideoEmbedField::__construct()
  2. 8.2 modules/video_embed_media/src/Plugin/media/Source/VideoEmbedField.php \Drupal\video_embed_media\Plugin\media\Source\VideoEmbedField::__construct()

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\Field\FieldTypePluginManagerInterface $field_type_manager: Config field type manager service.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory service.

\Drupal\video_embed_field\ProviderManagerInterface $provider_manager: The video provider manager.

Overrides MediaSourceBase::__construct

File

modules/video_embed_media/src/Plugin/media/Source/VideoEmbedField.php, line 62

Class

VideoEmbedField
Provides media source plugin for video embed field.

Namespace

Drupal\video_embed_media\Plugin\media\Source

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, FieldTypePluginManagerInterface $field_type_manager, ConfigFactoryInterface $config_factory, ProviderManagerInterface $provider_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager, $field_type_manager, $config_factory);
  $this->providerManager = $provider_manager;
  $this->mediaSettings = $config_factory
    ->get('media.settings');
}