function FieldPluginBase::getFieldType

Same name and namespace in other branches
  1. 8.9.x core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::getFieldType()
  2. 10 core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::getFieldType()
  3. 11.x core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::getFieldType()

Overrides MigrateFieldInterface::getFieldType

2 calls to FieldPluginBase::getFieldType()
DateField::getFieldType in core/modules/datetime/src/Plugin/migrate/field/DateField.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.
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;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.