You are here

public function SingleDateTimeBase::getCommonElementSettings in Single DateTimePicker 8

Return array of field settings.

Return value

array Formatted array of all available settings.

3 calls to SingleDateTimeBase::getCommonElementSettings()
SingleDateTimeRangeWidget::formElement in modules/single_datetime_range/src/Plugin/Field/FieldWidget/SingleDateTimeRangeWidget.php
Returns the form for a single field widget.
SingleDateTimeTimestampWidget::formElement in src/Plugin/Field/FieldWidget/SingleDateTimeTimestampWidget.php
Returns the form for a single field widget.
SingleDateTimeWidget::formElement in src/Plugin/Field/FieldWidget/SingleDateTimeWidget.php
Returns the form for a single field widget.

File

src/Plugin/Field/FieldWidget/SingleDateTimeBase.php, line 332

Class

SingleDateTimeBase
Base class for SingleDateTime widget types.

Namespace

Drupal\single_datetime\Plugin\Field\FieldWidget

Code

public function getCommonElementSettings() {
  return [
    '#hour_format' => $this
      ->getSetting('hour_format'),
    '#allow_seconds' => $this
      ->getSetting('allow_seconds'),
    '#allow_times' => $this
      ->getSetting('allow_times'),
    '#allowed_hours' => $this
      ->getSetting('allowed_hours'),
    '#disable_days' => $this
      ->getSetting('disable_days'),
    '#exclude_date' => $this
      ->getSetting('exclude_date'),
    '#inline' => $this
      ->getSetting('inline'),
    '#mask' => $this
      ->getSetting('mask'),
    '#datetimepicker_theme' => $this
      ->getSetting('datetimepicker_theme'),
    '#start_date' => $this
      ->getSetting('start_date'),
    '#min_date' => $this
      ->getSetting('min_date'),
    '#max_date' => $this
      ->getSetting('max_date'),
    '#year_start' => $this
      ->getSetting('year_start'),
    '#year_end' => $this
      ->getSetting('year_end'),
    '#allow_blank' => $this
      ->getSetting('allow_blank'),
  ];
}