Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityViewBuilder.php

function EntityViewBuilder::__construct

Constructs a new EntityViewBuilder.

Parameters

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

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service.

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

\Drupal\Core\Theme\Registry $theme_registry: The theme registry.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.

2 calls to EntityViewBuilder::__construct()
CommentViewBuilder::__construct in core/modules/comment/src/CommentViewBuilder.php
Constructs a new CommentViewBuilder.
CommentViewBuilder::__construct in core/modules/comment/src/CommentViewBuilder.php
Constructs a new CommentViewBuilder.
1 method overrides EntityViewBuilder::__construct()
CommentViewBuilder::__construct in core/modules/comment/src/CommentViewBuilder.php
Constructs a new CommentViewBuilder.

File

core/lib/Drupal/Core/Entity/EntityViewBuilder.php, line 97

Class

EntityViewBuilder
Base class for entity view builders.

Namespace

Drupal\Core\Entity

Code

public function __construct(EntityTypeInterface $entity_type, EntityRepositoryInterface $entity_repository, LanguageManagerInterface $language_manager, Registry $theme_registry, EntityDisplayRepositoryInterface $entity_display_repository) {
    $this->entityTypeId = $entity_type->id();
    $this->entityType = $entity_type;
    $this->entityRepository = $entity_repository;
    $this->languageManager = $language_manager;
    $this->themeRegistry = $theme_registry;
    $this->entityDisplayRepository = $entity_display_repository;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal