function ChainedPlaceholderStrategy::addPlaceholderStrategy
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Render/Placeholder/ChainedPlaceholderStrategy.php \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy::addPlaceholderStrategy()
- 10 core/lib/Drupal/Core/Render/Placeholder/ChainedPlaceholderStrategy.php \Drupal\Core\Render\Placeholder\ChainedPlaceholderStrategy::addPlaceholderStrategy()
- 11.x 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 25
Class
- ChainedPlaceholderStrategy
- Renders placeholders using a chain of placeholder strategies.
Namespace
Drupal\Core\Render\PlaceholderCode
public function addPlaceholderStrategy(PlaceholderStrategyInterface $strategy) {
$this->placeholderStrategies[] = $strategy;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.