Information for: DEVELOPERS   PARTNERS   SUPPORT

Understanding the dependency stack

The dependency stack (DependencyStack) is provided by the DepCalc module, and is involved in the content import and export processes. It functions as an object map of proxy objects to entities after they’ve been properly loaded.

The dependency stack is usually invisible to the developer, but during various events (such as the tamper layer), entities are explicitly manipulated for tracking by the dependency stack.

The dependency stack should always track entities by their remote UUID from the Content Hub service.

Contents of the dependency stack

The dependency stack contains \Drupal\depcalc\DependentEntityWrapperInterface objects in an object map keyed by remote UUID. DependentEntityWrapper objects are not entities, but understand how to retrieve an entity. This approach allows a large number of objects to be placed into a DependencyStack while keeping memory consumption needs relatively low.