Problem/Motivation

Entity tempstore swapping (loading the tempstore version of an entity during page rendering) was implemented in edit_plus's EntityConverter param converter, which hardcoded permission and mode checks. This meant any module wanting tempstore entity swapping had to depend on edit_plus, and there was no way to layer activation logic from multiple modules.

Proposed resolution

  • Introduce a TempstoreActivationCheckerInterface with isActive() and onEntitySwapped() methods, allowing modules to decorate the service to layer their own activation logic (e.g., navigation_plus checks edit mode, edit_plus checks permissions).
  • Provide a DefaultTempstoreActivationChecker (always inactive) so tempstore_plus works standalone without swapping anything until a decorator opts in.
  • Move the EntityConverter param converter decorator from edit_plus into tempstore_plus, wired to the activation checker.

API changes

  • New TempstoreActivationCheckerInterface — modules decorate tempstore_plus.activation_checker to control when tempstore entity swapping is active.
  • New tempstore_plus.param_converter.entity service — decorates core's paramconverter.entity.

Comments

tim bozeman created an issue. See original summary.

  • tim bozeman committed 7ebb1a0c on 1.0.x
    feat: #3576604 Refactor nested layout
    
    By: tim bozeman
    
tim bozeman’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.