Skip to content
Snippets Groups Projects
Commit 78aba575 authored by Florent Torregrosa's avatar Florent Torregrosa Committed by Pierre Dureau
Browse files

Issue #3488167 by grimreaper, pdureau: Display prop/slot description in forms

parent 2e43576e
No related branches found
No related tags found
1 merge request!269Issue #3488167 by grimreaper, pdureau: Display prop/slot description in forms
Pipeline #343510 passed
......@@ -42,6 +42,7 @@ abstract class ComponentFormBase extends FormElementBase implements TrustedCallb
$element[$prop_or_slot_id] = [
"#type" => "details",
"#title" => $title,
"#description" => $element["#description"] ?? NULL,
"#open" => FALSE,
];
}
......
......@@ -86,6 +86,7 @@ class ComponentPropsForm extends ComponentFormBase {
$element[$prop_id] = [
'#type' => 'component_prop_form',
'#title' => $prop["title"] ?? $prop_type->label(),
'#description' => $prop["description"] ?? $prop_type->getPluginDefinition()['description'] ?? NULL,
'#default_value' => $configuration[$prop_id] ?? [],
'#source_contexts' => $contexts,
'#tag_filter' => $element['#tag_filter'],
......
......@@ -80,6 +80,7 @@ class ComponentSlotsForm extends ComponentFormBase {
$element[$slot_id] = [
'#title' => $slot['title'] ?? '',
'#type' => 'component_slot_form',
'#description' => $slot["description"] ?? NULL,
'#default_value' => $configuration[$slot_id] ?? [],
'#component_id' => $component->getPluginId(),
'#slot_id' => $slot_id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment