public function LayoutParagraphsWidget::__construct in Layout Paragraphs 2.0.x
Same name and namespace in other branches
- 1.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.
Overrides WidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ LayoutParagraphsWidget.php, line 93
Class
- LayoutParagraphsWidget
- Layout paragraphs widget.
Namespace
Drupal\layout_paragraphs\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, LayoutParagraphsLayoutTempstoreRepository $tempstore, EntityTypeManagerInterface $entity_type_manager, LayoutPluginManager $layout_plugin_manager, FormBuilder $form_builder, EntityDisplayRepositoryInterface $entity_display_repository, ConfigFactoryInterface $config_factory) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->tempstore = $tempstore;
$this->entityTypeManager = $entity_type_manager;
$this->layoutPluginManager = $layout_plugin_manager;
$this->formBuilder = $form_builder;
$this->entityDisplayRepository = $entity_display_repository;
$this->config = $config_factory
->get('layout_paragraphs.settings');
}