Problem/Motivation
The \Drupal\field_group\FieldGroupFormatterInterface::settingsForm() methods are called in two different contexts:
- when creating the field group, by the
\Drupal\field_group\Form\FieldGroupAddFormform - when editing an existing field group, by the
field_group_format_settings_form()function called within thefield_group_field_ui_display_form_alter()hook implementation
In the edition context, $form and $form_state are passed to the settingsForm method, which is not a problem for PHP that accepts more arguments than defined in method calls.
In the creation context, these arguments are not passed to the settingsForm method.
As the \Drupal\field_group\FieldGroupFormatterInterface::settingsForm() method description does not include these parameters, one specific implementation cannot declare them without throwing a fatal error.
In some specific contrib cases (like UI Patterns Field Group or SDC Display modules implementations), having these parameters declared would be a good thing, even if your core formatters don't use them.
Proposed resolution
Add these parameters in \Drupal\field_group\FieldGroupFormatterInterface::settingsForm() method description and all field_group implementations.
Remaining tasks
Code and documentation.
API changes
New parameters on \Drupal\field_group\FieldGroupFormatterInterface::settingsForm().
Interface changes might break existing contrib/custom field group formatters.
This might be the appropriate time to do this before beta1!
| Comment | File | Size | Author |
|---|
Issue fork field_group-3495221
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
duaelfrAttaching patch for composer
Comment #4
duaelfrYou can call me stupid :D
MR and patch updated with the most important part
Comment #6
rosk0Changed look sensible, pipeline is green and I can use field group with components thanks to this and @duaelfr.
Comment #7
anybodyThanks for the important fix!
Comment #8
anybody