You are here

public function EntityReferenceBrowserWidget::__construct in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php \Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget::__construct()

Constructs widget plugin.

Parameters

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

array $settings: The widget settings.

array $third_party_settings: Any third party settings.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.

\Drupal\entity_browser\FieldWidgetDisplayManager $field_display_manager: Field widget display plugin manager.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

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

Overrides WidgetBase::__construct

1 call to EntityReferenceBrowserWidget::__construct()
FileBrowserWidget::__construct in src/Plugin/Field/FieldWidget/FileBrowserWidget.php
Constructs widget plugin.
1 method overrides EntityReferenceBrowserWidget::__construct()
FileBrowserWidget::__construct in src/Plugin/Field/FieldWidget/FileBrowserWidget.php
Constructs widget plugin.

File

src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php, line 104

Class

EntityReferenceBrowserWidget
Plugin implementation of the 'entity_reference' widget for entity browser.

Namespace

Drupal\entity_browser\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityTypeManagerInterface $entity_type_manager, FieldWidgetDisplayManager $field_display_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user, MessengerInterface $messenger) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->entityTypeManager = $entity_type_manager;
  $this->fieldDisplayManager = $field_display_manager;
  $this->moduleHandler = $module_handler;
  $this->currentUser = $current_user;
  $this->messenger = $messenger;
}