function Renderer::__construct
Constructs a new Renderer.
Parameters
\Drupal\Core\Controller\ControllerResolverInterface $controller_resolver: The controller resolver.
\Drupal\Core\Theme\ThemeManagerInterface $theme: The theme manager.
\Drupal\Core\Render\ElementInfoManagerInterface $element_info: The element info.
\Drupal\Core\Render\PlaceholderGeneratorInterface $placeholder_generator: The placeholder generator.
\Drupal\Core\Render\RenderCacheInterface $render_cache: The render cache service.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
array $renderer_config: The renderer configuration array.
File
- 
              core/lib/ Drupal/ Core/ Render/ Renderer.php, line 116 
Class
- Renderer
- Turns a render array into a HTML string.
Namespace
Drupal\Core\RenderCode
public function __construct(ControllerResolverInterface $controller_resolver, ThemeManagerInterface $theme, ElementInfoManagerInterface $element_info, PlaceholderGeneratorInterface $placeholder_generator, RenderCacheInterface $render_cache, RequestStack $request_stack, array $renderer_config) {
  $this->controllerResolver = $controller_resolver;
  $this->theme = $theme;
  $this->elementInfo = $element_info;
  $this->placeholderGenerator = $placeholder_generator;
  $this->renderCache = $render_cache;
  $this->rendererConfig = $renderer_config;
  $this->requestStack = $request_stack;
  // Initialize the context collection if needed.
  if (!isset(static::$contextCollection)) {
    static::$contextCollection = new \SplObjectStorage();
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
