You are here

public function FileBrowserWidget::__construct in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/FileBrowserWidget.php \Drupal\entity_browser\Plugin\Field\FieldWidget\FileBrowserWidget::__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\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository: The entity display repository service.

\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.

\Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface $mime_type_guesser: The mime type guesser service.

Overrides EntityReferenceBrowserWidget::__construct

File

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

Class

FileBrowserWidget
Entity browser file widget.

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, ConfigFactoryInterface $config_factory, EntityDisplayRepositoryInterface $display_repository, ModuleHandlerInterface $module_handler, AccountInterface $current_user, MimeTypeGuesserInterface $mime_type_guesser, MessengerInterface $messenger) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $entity_type_manager, $field_display_manager, $module_handler, $current_user, $messenger);
  $this->entityTypeManager = $entity_type_manager;
  $this->fieldDisplayManager = $field_display_manager;
  $this->configFactory = $config_factory;
  $this->displayRepository = $display_repository;
  $this->mimeTypeGuesser = $mime_type_guesser;
}