You are here

public function ChainedPlaceholderStrategy::addPlaceholderStrategy in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Render/Placeholder/ChainedPlaceholderStrategy.php \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy::addPlaceholderStrategy()

Adds a placeholder strategy to use.

Parameters

\Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface $strategy: The strategy to add to the placeholder strategies.

File

core/lib/Drupal/Core/Render/Placeholder/ChainedPlaceholderStrategy.php, line 30
Contains \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy.

Class

ChainedPlaceholderStrategy
Renders placeholders using a chain of placeholder strategies.

Namespace

Drupal\Core\Render\Placeholder

Code

public function addPlaceholderStrategy(PlaceholderStrategyInterface $strategy) {
  $this->placeholderStrategies[] = $strategy;
}