public function SourcePluginExtension::fields in Migrate Plus 8
Same name and namespace in other branches
- 8.5 src/Plugin/migrate/source/SourcePluginExtension.php \Drupal\migrate_plus\Plugin\migrate\source\SourcePluginExtension::fields()
- 8.2 src/Plugin/migrate/source/SourcePluginExtension.php \Drupal\migrate_plus\Plugin\migrate\source\SourcePluginExtension::fields()
- 8.3 src/Plugin/migrate/source/SourcePluginExtension.php \Drupal\migrate_plus\Plugin\migrate\source\SourcePluginExtension::fields()
- 8.4 src/Plugin/migrate/source/SourcePluginExtension.php \Drupal\migrate_plus\Plugin\migrate\source\SourcePluginExtension::fields()
Returns available fields on the source.
Return value
array Available fields in the source, keys are the field machine names as used in field mappings, values are descriptions.
Overrides MigrateSourceInterface::fields
File
- src/
Plugin/ migrate/ source/ SourcePluginExtension.php, line 50 - Contains Drupal\migrate_plus\Plugin\migrate\source\SourcePluginExtension.
Class
- SourcePluginExtension
- Generally-useful extensions to the core SourcePluginBase.
Namespace
Drupal\migrate_plus\Plugin\migrate\sourceCode
public function fields() {
$fields = [];
foreach ($this->fields as $field_info) {
$fields[$field_info['name']] = isset($field_info['label']) ? $field_info['label'] : $field_info['name'];
}
return $fields;
}