class ChainedPlaceholderStrategy implements PlaceholderStrategyInterface (View source)

Renders placeholders using a chain of placeholder strategies.

Properties

protected PlaceholderStrategyInterface[] $placeholderStrategies

An ordered list of placeholder strategy services.

Methods

addPlaceholderStrategy(PlaceholderStrategyInterface $strategy)

Adds a placeholder strategy to use.

array
processPlaceholders(array $placeholders)

Processes placeholders to render them with different strategies.

Details

addPlaceholderStrategy(PlaceholderStrategyInterface $strategy)

Adds a placeholder strategy to use.

Parameters

PlaceholderStrategyInterface $strategy

The strategy to add to the placeholder strategies.

array processPlaceholders(array $placeholders)

Processes placeholders to render them with different strategies.

Parameters

array $placeholders

The placeholders to process, with the keys being the markup for the placeholders and the values the corresponding render array describing the data to be rendered.

Return Value

array

The resulting placeholders, with a subset of the keys of $placeholders (and those being the markup for the placeholders) but with the corresponding render array being potentially modified to render e.g. an ESI or BigPipe placeholder.