diff --git a/core/lib/Drupal/Core/ProxyClass/Render/Strategy/RenderStrategyManager.php b/core/lib/Drupal/Core/ProxyClass/Render/Strategy/RenderStrategyManager.php new file mode 100644 index 0000000..7200c4d --- /dev/null +++ b/core/lib/Drupal/Core/ProxyClass/Render/Strategy/RenderStrategyManager.php @@ -0,0 +1,92 @@ +container = $container; + $this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id; + } + + /** + * Lazy loads the real service from the container. + * + * @return object + * Returns the constructed real service. + */ + protected function lazyLoadItself() + { + if (!isset($this->service)) { + $this->service = $this->container->get($this->drupalProxyOriginalServiceId); + } + + return $this->service; + } + + /** + * {@inheritdoc} + */ + public function addRenderStrategy(\Drupal\Core\Render\Strategy\RenderStrategyInterface $strategy) + { + return $this->lazyLoadItself()->addRenderStrategy($strategy); + } + + /** + * {@inheritdoc} + */ + public function processPlaceholders(array $placeholders) + { + return $this->lazyLoadItself()->processPlaceholders($placeholders); + } + + } + +}