- Issue created by @roderik
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
Dumping draft comments I jotted down somewhere, to check at the same time. Not fixing for understandability - I will likely be the one to look at this anyway.
- take CoreFieldCeFieldFormatter - check buildConfigurationForm() & settingsForm(). - what is what? <-- settingsForm() is never used - when you understand that: fix the fact that CustomElementsFieldFormatterBase::settingsForm() / settingsSummary() have no definition in an interface AND STILL have @inheritdoc - then document that, in settingsform() (????), you should not use 'field_definition', 'view_mode', 'name', 'is_slot' -- because they will not be used.
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
Better comments for myself / later reference (I will be able to find them back):
g/setSetting(s)() + static defaultSettings() are from PluginSettingsInterface
g/setConfiguration() + non-static defaultConfiguration() are from ConfigurableInterface
settingsForm() & settingsSummary() are not in an interface. Core field formatters have them in FormatterInterface but we don't implement that.
settingsForm() is not used anywhere, can be deleted. settingsSummary() we should probably add to CustomElementsFieldFormatterInterface. (We've done the same with static isApplicable() which ia also in FormatterInterface.)
build/validate/submitConfigurationForm() are from PluginFormInterface
There's a Core issue to merge PluginSettingsInterface into ConfigurableInterface ( #1764380: Merge PluginSettingsInterface into ConfigurableInterface → ) but it isn't going anywhere. (If that is ever done, I assume all "*Setting*" names will be deprecated.)
The only reason why we implement PluginSettingsInterface, seems to be that EntityDisplayInterface:getRenderer()'s return value requires it. Otherwise we would not have these duplicate methods.
We could have chosen to not implement ConfigurableInterface instead, but we didn't. (Also PluginSettingsInterface::defaultSettings() is more clunky because static.)
- Assigned to fago
- Status changed to Needs review
4 months ago 12:55pm 10 September 2024 - 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
@fago for review, as this is a basic change to your code.
- 🇦🇹Austria fago Vienna
Thank you, this seems gresat! This improves things largely and will definitely help to avoid (further) confusion.
- Status changed to Fixed
4 months ago 4:05am 11 September 2024 Automatically closed - issue fixed for 2 weeks with no activity.