Adopt Entity API for state mgmt, part 2: Move logic

Created on 30 August 2025, 7 days ago

Problem/Motivation

Follow-up of πŸ“Œ Move state management to the Entity API? Active

In order to meet the initial goals of this task:

  • Simplify the implementation by leveraging existing Drupal interfaces and mechanisms
  • Better performance, by reducing the (excessive) number of read and write from/to the State API
  • Add access control logic in the entity handler

Proposed solution

  • Move StateManager and StateStorage services logic to Instance entity and InstanceStorage handler
  • Replace the temporary getRuntime*() and setRuntime*() methods of InstanceInterface by the unified manipulation of the entity properties
  • Remove all "src/StateManager" folder.

Related tasks expected in this issue:

  • in islands and elsewhere pass the directly Drupal\display_builder\InstanceInterface $builder around instead of loading it multiple time from entity type manager.
  • WithDisplayBuilderInterface::getInstance(): InstanceInterface instead of ::getInstanceId(): string ?
  • We can remove WithDisplayBuilderInterface::initInstanceIfMissing() because all implementation are identical
  • Replace DisplayBuilderUiController by a proper entity list handler
πŸ“Œ Task
Status

Active

Version

1.0

Component

State Manager

Created by

πŸ‡«πŸ‡·France pdureau Paris

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024