public function DurationWidget::__construct in Duration Field 3.0.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/DurationWidget.php \Drupal\duration_field\Plugin\Field\FieldWidget\DurationWidget::__construct()
- 8 src/Plugin/Field/FieldWidget/DurationWidget.php \Drupal\duration_field\Plugin\Field\FieldWidget\DurationWidget::__construct()
Constructs a DurationWidget object.
Parameters
string $plugin_id: The plugin ID.
mixed $plugin_definition: The plugin definition.
Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.
array $settings: The field settings.
array $third_party_settings: Third party settings.
\Drupal\duration_field\Service\DurationServiceInterface $duration_service: The duration service.
Overrides WidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ DurationWidget.php, line 50
Class
- DurationWidget
- Widget for inputting durations.
Namespace
Drupal\duration_field\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, DurationServiceInterface $duration_service) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->durationService = $duration_service;
}