You are here

public function DurationWidget::__construct in Duration Field 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/DurationWidget.php \Drupal\duration_field\Plugin\Field\FieldWidget\DurationWidget::__construct()
  2. 3.0.x 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 $durationService: The duration service.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/DurationWidget.php, line 50

Class

DurationWidget
Creates a default widget to output a duration field.

Namespace

Drupal\duration_field\Plugin\Field\FieldWidget

Code

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