You are here

function datex_field_widget_info_alter in Datex 8

Implements hook_field_widget_info_alter().

File

./datex.module, line 184

Code

function datex_field_widget_info_alter(&$info) {
  $info['datetime_default']['class'] = DatexDateTimeDefaultWidget::class;
  $info['datetime_datelist']['class'] = DatexDateTimeDatelistWidget::class;
  $info['datetime_timestamp']['class'] = DatexTimestampDatetimeWidget::class;
  if (isset($info['datetime_timestamp_no_default'])) {
    $info['datetime_timestamp_no_default']['class'] = DatexTimestampDatetimeNoDefaultWidget::class;
  }
  foreach ([
    'default',
    'datelist',
    'timestamp',
    'timestamp_no_default',
  ] as $item) {
    $info["datetime_{$item}"]['provider'] = 'datex';
  }
}