You are here

public function FieldPluginBase::getFieldType in Drupal 10

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

Computes the destination type of a migrated field.

Parameters

\Drupal\migrate\Row $row: The field being migrated.

Return value

string The destination field type.

Overrides MigrateFieldInterface::getFieldType

1 call to FieldPluginBase::getFieldType()
DateField::getFieldType in core/modules/datetime/src/Plugin/migrate/field/DateField.php
Computes the destination type of a migrated field.
4 methods override FieldPluginBase::getFieldType()
DateField::getFieldType in core/modules/datetime/src/Plugin/migrate/field/DateField.php
Computes the destination type of a migrated field.
FileField::getFieldType in core/modules/file/src/Plugin/migrate/field/d6/FileField.php
Computes the destination type of a migrated field.
TextField::getFieldType in core/modules/text/src/Plugin/migrate/field/d6/TextField.php
Computes the destination type of a migrated field.
TextField::getFieldType in core/modules/text/src/Plugin/migrate/field/d7/TextField.php
Computes the destination type of a migrated field.

File

core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php, line 108

Class

FieldPluginBase
The base class for all field plugins.

Namespace

Drupal\migrate_drupal\Plugin\migrate\field

Code

public function getFieldType(Row $row) {
  $field_type = $row
    ->getSourceProperty('type');
  if (isset($this->pluginDefinition['type_map'][$field_type])) {
    return $this->pluginDefinition['type_map'][$field_type];
  }
  else {
    return $field_type;
  }
}