You are here

public function LayoutParagraphsWidget::__construct in Layout Paragraphs 1.0.x

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php \Drupal\layout_paragraphs\Plugin\Field\FieldWidget\LayoutParagraphsWidget::__construct()

Constructs a WidgetBase 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\Render\Renderer $renderer: Core renderer service.

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

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.

\Drupal\Core\Layout\LayoutPluginManager $layout_plugin_manager: Core layout plugin manager service.

\Drupal\Core\Plugin\PluginFormFactoryInterface $plugin_form_manager: The plugin form manager.

\Drupal\Core\Language\LanguageManager $language_manager: Core language manager service.

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

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

\drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

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

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/LayoutParagraphsWidget.php, line 203

Class

LayoutParagraphsWidget
Entity Reference with Layout field widget.

Namespace

Drupal\layout_paragraphs\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, Renderer $renderer, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, LayoutPluginManager $layout_plugin_manager, PluginFormFactoryInterface $plugin_form_manager, LanguageManager $language_manager, AccountProxyInterface $current_user, EntityDisplayRepositoryInterface $entity_display_repository, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->renderer = $renderer;
  $this->entityTypeManager = $entity_type_manager;
  $this->entityTypeBundleInfo = $entity_type_bundle_info;
  $this->layoutPluginManager = $layout_plugin_manager;
  $this->pluginFormFactory = $plugin_form_manager;
  $this->fieldName = $this->fieldDefinition
    ->getName();
  $this->languageManager = $language_manager;
  $this->currentUser = $current_user;
  $this->entityDisplayRepository = $entity_display_repository;
  $this->config = $config_factory;
  $this->moduleHandler = $module_handler;
}