- Issue created by @pdureau
- First commit to issue fork.
- 🇩🇪Germany Christian.wiedemann
I think we should handle this with blocks not with an own source.
Mikael has suggested to add a source for slots which acts like EntityView block plugin from ctools → module.
Context: current entity.
Config: pick a view mode:
$form['view_mode'] = [
'#type' => 'select',
'#options' => $this->entityDisplayRepository->getViewModeOptions($this->getDerivativeId()),
'#title' => $this->t('View mode'),
'#default_value' => $this->configuration['view_mode'],
];
Render the selected view mode of the current entity. Beware of the recursion loop.
Before adding such a feature, let's discuss.
Ctools is a popular module and this handy block is one of the main reason people install this module. But do we need such a source plugin? Is it that common? Do we have examples of real life use cases?
Is the existing BlockSource plugin able to embed this block? Or is it prevented by ui_patterns_plugin_filter_block__ui_patterns_alter
?
We need to be careful not to add a niche features which will clutter the UX and be an extra weight to carry during module maintenance.
Active
2.0
Code
I think we should handle this with blocks not with an own source.