function ConfigurableLanguageRenderer::__construct

Same name in other branches
  1. 9 core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php \Drupal\views\Entity\Render\ConfigurableLanguageRenderer::__construct()
  2. 8.9.x core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php \Drupal\views\Entity\Render\ConfigurableLanguageRenderer::__construct()
  3. 10 core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php \Drupal\views\Entity\Render\ConfigurableLanguageRenderer::__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.

string|null $langcode: A specific language code to set, if available.

Overrides RendererBase::__construct

File

core/modules/views/src/Entity/Render/ConfigurableLanguageRenderer.php, line 34

Class

ConfigurableLanguageRenderer
Renders entities in a configured language.

Namespace

Drupal\views\Entity\Render

Code

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

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