class RenderContext extends SplStack (View source)

The render context: a stack containing bubbleable rendering metadata.

A stack of \Drupal\Core\Render\BubbleableMetadata objects.

Methods

update(array $element)

Updates the current frame of the stack.

bubble()

Bubbles the stack.

Details

update(array $element)

Updates the current frame of the stack.

Parameters

array $element

The element of the render array that has just been rendered. The stack frame for this element will be updated with the bubbleable rendering metadata of this element.

bubble()

Bubbles the stack.

Whenever another level in the render array has been rendered, the stack must be bubbled, to merge its rendering metadata with that of the parent element.