You are here

public function CckFieldPluginBase::getFieldType in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase::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 MigrateCckFieldInterface::getFieldType

2 methods override CckFieldPluginBase::getFieldType()
FileField::getFieldType in core/modules/file/src/Plugin/migrate/cckfield/FileField.php
Computes the destination type of a migrated field.
TextField::getFieldType in core/modules/text/src/Plugin/migrate/cckfield/TextField.php
Computes the destination type of a migrated field.

File

core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php, line 77
Contains \Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase.

Class

CckFieldPluginBase
The base class for all cck field plugins.

Namespace

Drupal\migrate_drupal\Plugin\migrate\cckfield

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;
  }
}