You are here

public function PersianDateTimeDefaultWidget::__construct in Persian Date for Drupal 8 8

Same name and namespace in other branches
  1. 8.4 src/Plugin/Field/FieldWidget/PersianDateTimeDefaultWidget.php \Drupal\persian_date\Plugin\Field\FieldWidget\PersianDateTimeDefaultWidget::__construct()

Constructs a WidgetBase 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.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/PersianDateTimeDefaultWidget.php, line 36

Class

PersianDateTimeDefaultWidget
Plugin implementation of the 'datetime_default' widget.

Namespace

Drupal\persian_date\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;
}