'#suffix' => '</div>',
];
return $form;
} /**
* Render API callback: builds the formatter settings elements.
*/
public function formatterSettingsProcessCallback(array &
$element, FormStateInterface
$form_state, array &
$complete_form) { if ($formatter =
$this->
getFormatter($element['#parents'
],
$form_state)) { $element['settings_wrapper'
]['settings'
] =
$formatter->
settingsForm($complete_form,
$form_state);
$element['settings_wrapper'
]['settings'
]['#parents'
] =
array_merge($element['#parents'
],
['settings'
]);
$element['settings_wrapper'
]['third_party_settings'
] =
$this->
thirdPartySettingsForm($formatter,
$this->
getFieldDefinition(),
$complete_form,
$form_state);
$element['settings_wrapper'
]['third_party_settings'
]['#parents'
] =
array_merge($element['#parents'
],
['third_party_settings'
]);
FormHelper::
rewriteStatesSelector($element['settings_wrapper'
], "fields[
$this->fieldName][settings_edit_form]", 'settings[formatter]'
);
// Store the array parents for our element so that we can retrieve the
// formatter settings in our AJAX callback.
$form_state->
set('field_block_array_parents',
$element['#array_parents'
]);
} return $element;
}