function FieldDiscovery::getEntityFields
Same name in other branches
- 9 core/modules/migrate_drupal/src/FieldDiscovery.php \Drupal\migrate_drupal\FieldDiscovery::getEntityFields()
- 8.9.x core/modules/migrate_drupal/src/FieldDiscovery.php \Drupal\migrate_drupal\FieldDiscovery::getEntityFields()
- 11.x core/modules/migrate_drupal/src/FieldDiscovery.php \Drupal\migrate_drupal\FieldDiscovery::getEntityFields()
Gets all field information for a particular entity type.
Parameters
string $core: The Drupal core version.
string $entity_type_id: The legacy entity type ID.
Return value
array A multidimensional array of source data from the relevant field instance migration for the entity type, keyed first by bundle and then by field name.
1 call to FieldDiscovery::getEntityFields()
- FieldDiscovery::getBundleFields in core/
modules/ migrate_drupal/ src/ FieldDiscovery.php - Gets all field information for a particular entity type and bundle.
1 method overrides FieldDiscovery::getEntityFields()
- FieldDiscoveryTestClass::getEntityFields in core/
modules/ migrate_drupal/ tests/ modules/ field_discovery_test/ src/ FieldDiscoveryTestClass.php - Gets all field information for a particular entity type.
File
-
core/
modules/ migrate_drupal/ src/ FieldDiscovery.php, line 238
Class
- FieldDiscovery
- Provides field discovery for Drupal 6 & 7 migrations.
Namespace
Drupal\migrate_drupalCode
protected function getEntityFields($core, $entity_type_id) {
$fields = $this->getAllFields($core);
if (!empty($fields[$entity_type_id])) {
return $fields[$entity_type_id];
}
return [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.