function FileField::getFieldType

Same name and namespace in other branches
  1. 8.9.x core/modules/file/src/Plugin/migrate/field/d6/FileField.php \Drupal\file\Plugin\migrate\field\d6\FileField::getFieldType()
  2. 8.9.x core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php \Drupal\file\Plugin\migrate\cckfield\d6\FileField::getFieldType()
  3. 8.9.x core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php \Drupal\file\Plugin\migrate\cckfield\d7\FileField::getFieldType()
  4. 10 core/modules/file/src/Plugin/migrate/field/d6/FileField.php \Drupal\file\Plugin\migrate\field\d6\FileField::getFieldType()
  5. 11.x core/modules/file/src/Plugin/migrate/field/d6/FileField.php \Drupal\file\Plugin\migrate\field\d6\FileField::getFieldType()

Overrides FieldPluginBase::getFieldType

File

core/modules/file/src/Plugin/migrate/field/d6/FileField.php, line 58

Class

FileField
Plugin annotation @MigrateField( id = "filefield", core = {6}, source_module = "filefield", destination_module = "file" )

Namespace

Drupal\file\Plugin\migrate\field\d6

Code

public function getFieldType(Row $row) {
    return $row->getSourceProperty('widget_type') == 'imagefield_widget' ? 'image' : 'file';
}

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