You are here

public function TimeRangeWidget::__construct in Time Range 8

Constructs a TimeRangeWidget 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\Core\Entity\EntityStorageInterface $date_storage: The date_format entity storage.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/TimeRangeWidget.php, line 48

Class

TimeRangeWidget
Plugin implementation of the 'time_range' widget.

Namespace

Drupal\time_range\Plugin\Field\FieldWidget

Code

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