You are here

public function WidgetBase::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::__construct()

Constructs a WidgetBase object.

Parameters

array $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 PluginBase::__construct

3 calls to WidgetBase::__construct()
DateTimeDefaultWidget::__construct in core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php
Constructs a WidgetBase object.
FileWidget::__construct in core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
Constructs a WidgetBase object.
OptionsWidgetBase::__construct in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
Constructs a WidgetBase object.
3 methods override WidgetBase::__construct()
DateTimeDefaultWidget::__construct in core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDefaultWidget.php
Constructs a WidgetBase object.
FileWidget::__construct in core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
Constructs a WidgetBase object.
OptionsWidgetBase::__construct in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
Constructs a WidgetBase object.

File

core/lib/Drupal/Core/Field/WidgetBase.php, line 55
Contains \Drupal\Core\Field\WidgetBase.

Class

WidgetBase
Base class for 'Field widget' plugin implementations.

Namespace

Drupal\Core\Field

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings) {
  parent::__construct(array(), $plugin_id, $plugin_definition);
  $this->fieldDefinition = $field_definition;
  $this->settings = $settings;
  $this->thirdPartySettings = $third_party_settings;
}