public function OptionsShsWidget::__construct in Simple hierarchical select 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldWidget/OptionsShsWidget.php \Drupal\shs\Plugin\Field\FieldWidget\OptionsShsWidget::__construct()
Constructs a new OptionsShsWidget object.
Parameters
string $plugin_id: Plugin id.
mixed $plugin_definition: Plugin definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: Field definition.
array $settings: Field settings.
array $third_party_settings: Third party settings.
\Drupal\shs\WidgetDefaults $widget_defaults: The widget defaults SHS service.
Overrides OptionsWidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ OptionsShsWidget.php, line 55
Class
- OptionsShsWidget
- Plugin implementation of the 'options_shs' widget.
Namespace
Drupal\shs\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, WidgetDefaults $widget_defaults) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->widgetDefaults = $widget_defaults;
// Set translation context.
$this->translationContext = 'shs:options_widget';
}