public function NameWidget::__construct in Name Field 8
Constructs a NameWidget 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\name\NameOptionsProvider $options_provider: Name options provider service.
Overrides WidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ NameWidget.php, line 56
Class
- NameWidget
- Plugin implementation of the 'name' widget.
Namespace
Drupal\name\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, NameOptionsProvider $options_provider) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->optionsProvider = $options_provider;
}