function FileField::getFieldType

Overrides FieldPluginBase::getFieldType

File

core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php, line 68

Class

FileField
Plugin annotation @MigrateCckField( id = "file", core = {7}, source_module = "file", destination_module = "file" )

Namespace

Drupal\file\Plugin\migrate\cckfield\d7

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.