You are here

public function LibraryItemFieldWidget::__construct in Library 8

Constructs an InlineEntityFormBase object.

Parameters

string $plugin_id: The plugin_id for the widget.

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\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

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

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/LibraryItemFieldWidget.php, line 77

Class

LibraryItemFieldWidget
Plugin implementation of the 'library_item_field_widget' widget.

Namespace

Drupal\library\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->entityTypeBundleInfo = $entity_type_bundle_info;
  $this->entityTypeManager = $entity_type_manager;
  $this->entityDisplayRepository = $entity_display_repository;
}