Skip to content
Snippets Groups Projects
Commit b92483a4 authored by Jean Valverde's avatar Jean Valverde :construction_site: Committed by Mikael Meulle
Browse files

Issue #3491536 by mogtofu33, just_like_good_vibes: Icon as slot or prop

parent e7baca91
No related branches found
No related tags found
1 merge request!283Issue #3491536 by mogtofu33: Icon as slot or prop
Pipeline #359332 passed
......@@ -136,6 +136,7 @@ abstract class EntityFieldSourceDeriverBase extends DeriverBase implements Conta
"label" => $field_storage_definition->getLabel(),
"bundles" => array_values($field_info['bundles'] ?? []),
"metadata" => [
"type" => $field_storage_definition->getType(),
"configurable" => ($field_storage_definition instanceof FieldStorageConfig),
"editorial" => in_array($field_name, $entityFieldsClassification["fields_editorial"]),
"parent_base" => in_array($field_name, $entityFieldsClassification["parents_base"]),
......
......@@ -128,7 +128,19 @@ abstract class DerivableContextSourceBase extends SourcePluginBase {
}
$sources = $sources["value"];
$source_configuration = $this->isSlot() ? array_values($sources["sources"])[0] : $sources;
if ($this->isSlot()) {
if (isset($sources["sources"])) {
$source_configuration = array_values($sources["sources"])[0];
}
}
else {
$source_configuration = $sources;
}
if (!isset($source_configuration["source_id"])) {
return $this->sourcePlugins;
}
foreach ($derived_contexts as $derived_context) {
$target_plugin_configuration = array_merge($source_configuration["source"] ?? [], [
"context" => $derived_context,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment