You are here

public function DateField::getFieldFormatterMap in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/datetime/src/Plugin/migrate/field/DateField.php \Drupal\datetime\Plugin\migrate\field\DateField::getFieldFormatterMap()
  2. 9 core/modules/datetime/src/Plugin/migrate/field/DateField.php \Drupal\datetime\Plugin\migrate\field\DateField::getFieldFormatterMap()

Get a map between D6 formatters and D8 formatters for this field type.

This is used by static::alterFieldFormatterMigration() in the base class.

Return value

array The keys are D6 formatters and the values are D8 formatters.

Overrides FieldPluginBase::getFieldFormatterMap

File

core/modules/datetime/src/Plugin/migrate/field/DateField.php, line 33

Class

DateField
Provides a field plugin for date and time fields.

Namespace

Drupal\datetime\Plugin\migrate\field

Code

public function getFieldFormatterMap() {
  return [
    'date_default' => 'datetime_default',
    'format_interval' => 'datetime_time_ago',
    // The date_plain formatter exists in Drupal 7 but not Drupal 6. It is
    // added here because this plugin is declared for Drupal 6 and Drupal 7.
    'date_plain' => 'datetime_plain',
  ];
}