Renderer::__construct

public Renderer::__construct(ControllerResolverInterface $controller_resolver, ThemeManagerInterface $theme, ElementInfoManagerInterface $element_info, PlaceholderGeneratorInterface $placeholder_generator, RenderCacheInterface $render_cache, RequestStack $request_stack, array $renderer_config)

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 111

Class

Renderer
Turns a render array into a HTML string.

Namespace

Drupal\Core\Render

Code

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();
  }
}
doc_Drupal
2016-10-29 09:37:38
Comments
Leave a Comment

Please login to continue.