Skip to content
Snippets Groups Projects
Commit f28f8ac4 authored by mxh's avatar mxh
Browse files

Issue #3354676 by mxh: Wrong dependency calculation on field parameter type

parent 2a2399ff
No related branches found
No related tags found
No related merge requests found
......@@ -313,9 +313,11 @@ class Fields extends ParameterBase implements PropertyParameterInterface, Depend
if ($this->moduleHandler->moduleExists('field')) {
$field_config_storage = $this->entityTypeManager->getStorage('field_config');
$selected_fields = $this->configuration['selected'] ?? [];
foreach ($bundles as $bundle) {
foreach (array_keys($this->entityFieldManager->getFieldDefinitions($entity_type->id(), $bundle)) as $field_name) {
if ($field_config = $field_config_storage->load($entity_type->id() . '.' . $bundle . '.' . $field_name)) {
$field_definitions = $this->entityFieldManager->getFieldDefinitions($entity_type->id(), $bundle);
foreach ($selected_fields as $field_name) {
if (isset($field_definitions[$field_name]) && ($field_config = $field_config_storage->load($entity_type->id() . '.' . $bundle . '.' . $field_name))) {
$dependencies[$field_config->getConfigDependencyKey()][] = $field_config->getConfigDependencyName();
}
}
......
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