Skip to content
Snippets Groups Projects
Commit 2d55b4ff authored by crzdev's avatar crzdev
Browse files

Issue #3045509: Complete the field map with extra bundle field info

parent 35ca6308
No related branches found
No related tags found
2 merge requests!8374Issue #3045509: Complete the field map with extra bundle field info,!8373Issue #3427374 by danflanagan8, Vighneshh: taxonomy_tid ViewsArgumentDefault...
...@@ -546,6 +546,22 @@ public function getFieldMap() { ...@@ -546,6 +546,22 @@ public function getFieldMap() {
} }
} }
// Complete the field map with extra bundle field info.
foreach ($this->fieldMap as $entity_type_id => $entity_field_map) {
$entity_type_bundles_list = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id);
foreach (array_keys($entity_type_bundles_list) as $bundle_id) {
if ($bundle_id != 'default') {
$bundle_field_definitions = $this->getFieldDefinitions($entity_type_id, $bundle_id);
foreach ($bundle_field_definitions as $bundle_field_name => $bundle_field_definition) {
if (!isset($entity_field_map[$bundle_field_name])) {
$this->fieldMap[$entity_type_id][$bundle_field_name]['type'] = $bundle_field_definition->getType();
$this->fieldMap[$entity_type_id][$bundle_field_name]['bundles'][$bundle_id] = $bundle_id;
}
}
}
}
}
$this->cacheSet($cid, $this->fieldMap, Cache::PERMANENT, ['entity_types', 'entity_field_info']); $this->cacheSet($cid, $this->fieldMap, Cache::PERMANENT, ['entity_types', 'entity_field_info']);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment