You are here

public function Video::__construct in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/Video.php \Drupal\video_embed_field\Plugin\Field\FieldFormatter\Video::__construct()

Constructs a new instance of the plugin.

Parameters

string $plugin_id: The plugin_id for the formatter.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the formatter is associated.

array $settings: The formatter settings.

string $label: The formatter label display setting.

string $view_mode: The view mode.

array $third_party_settings: Third party settings.

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

\Drupal\Core\Session\AccountInterface $current_user: The logged in user.

Overrides FormatterBase::__construct

File

src/Plugin/Field/FieldFormatter/Video.php, line 65

Class

Video
Plugin implementation of the video field formatter.

Namespace

Drupal\video_embed_field\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, $settings, $label, $view_mode, $third_party_settings, ProviderManagerInterface $provider_manager, AccountInterface $current_user) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->providerManager = $provider_manager;
  $this->currentUser = $current_user;
}