[2.0.0-beta4] Add EntityView source for slots?

Created on 3 October 2024, 4 months ago

Problem/Motivation

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.

Proposed resolution

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.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024