You are here

public function DefaultParagraphsWidget::__construct in Default Paragraphs 8

Constructs display 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.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: Event dispatcher service.

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

\Drupal\Core\Utility\Token $token_service.: Token service.

Overrides ParagraphsWidget::__construct

File

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

Class

DefaultParagraphsWidget
Plugin implementation of the 'entity_reference_revisions paragraphs' widget.

Namespace

Drupal\default_paragraphs\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EventDispatcherInterface $event_dispatcher, EntityDisplayRepositoryInterface $entity_display_repository, Token $token_service) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->eventDispatcher = $event_dispatcher;
  $this->entityDisplayRepository = $entity_display_repository;
  $this->tokenService = $token_service;
}