function RendererBase::__construct

Same name in other branches
  1. 8.9.x core/modules/views/src/Entity/Render/RendererBase.php \Drupal\views\Entity\Render\RendererBase::__construct()
  2. 10 core/modules/views/src/Entity/Render/RendererBase.php \Drupal\views\Entity\Render\RendererBase::__construct()
  3. 11.x core/modules/views/src/Entity/Render/RendererBase.php \Drupal\views\Entity\Render\RendererBase::__construct()

Constructs a renderer object.

Parameters

\Drupal\views\ViewExecutable $view: The entity row being rendered.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

2 calls to RendererBase::__construct()
ConfigurableLanguageRenderer::__construct in core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php
Constructs a renderer object.
EntityFieldRenderer::__construct in core/modules/views/src/Entity/Render/EntityFieldRenderer.php
Constructs an EntityFieldRenderer object.
2 methods override RendererBase::__construct()
ConfigurableLanguageRenderer::__construct in core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php
Constructs a renderer object.
EntityFieldRenderer::__construct in core/modules/views/src/Entity/Render/EntityFieldRenderer.php
Constructs an EntityFieldRenderer object.

File

core/modules/views/src/Entity/Render/RendererBase.php, line 56

Class

RendererBase
Defines a base class for entity renderers.

Namespace

Drupal\views\Entity\Render

Code

public function __construct(ViewExecutable $view, LanguageManagerInterface $language_manager, EntityTypeInterface $entity_type) {
    $this->view = $view;
    $this->languageManager = $language_manager;
    $this->entityType = $entity_type;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.