- Issue created by @pdureau
All implementations of WithDisplayBuilderInterface::initInstanceIfMissing()
are strictly identical:
public function initInstanceIfMissing(): void {
/** @var \Drupal\display_builder\InstanceStorage $storage */
$storage = $this->entityTypeManager->getStorage('display_builder_instance');
/** @var \Drupal\display_builder\InstanceInterface $instance */
$instance = $storage->load($this->getInstanceId());
if (!$instance) {
$instance = $storage->createFromImplementation($this);
$instance->save();
}
}
In:
Centralize the logic in \Drupal\display_builder\InstanceStorage
or somewhere else ?
Active
1.0
Main / Misc.