Skip to content
Snippets Groups Projects

Issue #3469119 by mogtofu33: Field formatter details, no required in settings

7 files
+ 12
21
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -113,6 +113,10 @@ class IconFormatter extends FormatterBase implements ContainerFactoryPluginInter
public function settingsForm(array $form, FormStateInterface $form_state): array {
$elements = parent::settingsForm($form, $form_state);
$icon_settings = $this->getSetting('icon_settings') ?? [];
$this->pluginManagerIconPack->getExtractorPluginForms($elements, $form_state, $icon_settings, [], TRUE);
// @todo get widget settings to know if field has extractor settings enabled.
$elements['icon_pack_notice'] = [
'#type' => 'html_tag',
@@ -121,10 +125,6 @@ class IconFormatter extends FormatterBase implements ContainerFactoryPluginInter
'#attributes' => ['class' => ['description']],
];
$icon_settings = $this->getSetting('icon_settings') ?? [];
$this->pluginManagerIconPack->getExtractorPluginForms($elements, $form_state, $icon_settings);
// Placeholder to get all settings serialized as the form keys are dynamic
// and based on icon pack definition options.
// @todo probably change to #element_submit when available in
Loading