- Issue created by @pdureau
- 🇫🇷France pdureau Paris
Remain work:
- Regression, display not rendered. Looks like a context issue.
- Remove
DisplayBuilder::DISPLAY_BUILDER_CONFIG
again - Update devel controller again
- Merge request !43Issue #3538026 by pdureau, just_like_good_vibes: Implement WithDisplayBuilderInterface in Entity View → (Open) created by pdureau
- 🇫🇷France just_like_good_vibes PARIS
pdureau → credited just_like_good_vibes → .
- 🇫🇷France pdureau Paris
Tested with Mikael, works OK.
However, we need to apply this drafty patch to make it works:
diff --git a/modules/display_builder_entity_view/src/Entity/DisplayBuilderEntityViewDisplay.php b/modules/display_builder_entity_view/src/Entity/DisplayBuilderEntityViewDisplay.php index bb35966..4d731fb 100644 --- a/modules/display_builder_entity_view/src/Entity/DisplayBuilderEntityViewDisplay.php +++ b/modules/display_builder_entity_view/src/Entity/DisplayBuilderEntityViewDisplay.php @@ -238,7 +238,7 @@ class DisplayBuilderEntityViewDisplay extends LayoutBuilderEntityViewDisplay imp $this->stateManager->create($instance_id, (string) $this->getDisplayBuilder()->id(), [], $contexts); // Careful. StateManager::create() is not saving properly the contexts. // Let's do it again. - $this->stateManager->setContexts($instance_id, $contexts); + //$this->stateManager->setContexts($instance_id, $contexts); } /** diff --git a/src/IslandPluginBase.php b/src/IslandPluginBase.php index dd69177..f76e068 100644 --- a/src/IslandPluginBase.php +++ b/src/IslandPluginBase.php @@ -47,7 +47,7 @@ abstract class IslandPluginBase extends PluginBase implements IslandInterface { /** * The contexts for islands. */ - protected array $contexts = []; + //protected array $contexts = []; /** * {@inheritdoc} @@ -64,8 +64,8 @@ abstract class IslandPluginBase extends PluginBase implements IslandInterface { ) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->data = $configuration; - $this->contexts = $configuration['contexts'] ?? []; - unset($configuration['contexts']); + // $this->contexts = $configuration['contexts'] ?? []; + // unset($configuration['contexts']); $this->setConfiguration($configuration); }
It is related to 📌 Add the island configuration forms Active
- 🇫🇷France pdureau Paris
I take it back, i need to add little rule in
::initInstanceIfMissing()
- 🇫🇷France pdureau Paris
Everything done.
Follow-up: 📌 WithDisplayBuilderInterface follow-ups Active