You are here

public function EntityViewBuilder::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityViewBuilder.php \Drupal\Core\Entity\EntityViewBuilder::__construct()

Constructs a new EntityViewBuilder.

Parameters

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

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service.

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

3 calls to EntityViewBuilder::__construct()
BlockViewBuilder::__construct in core/modules/block/src/BlockViewBuilder.php
Constructs a new BlockViewBuilder.
CommentViewBuilder::__construct in core/modules/comment/src/CommentViewBuilder.php
Constructs a new CommentViewBuilder.
FeedViewBuilder::__construct in core/modules/aggregator/src/FeedViewBuilder.php
Constructs a new FeedViewBuilder.
3 methods override EntityViewBuilder::__construct()
BlockViewBuilder::__construct in core/modules/block/src/BlockViewBuilder.php
Constructs a new BlockViewBuilder.
CommentViewBuilder::__construct in core/modules/comment/src/CommentViewBuilder.php
Constructs a new CommentViewBuilder.
FeedViewBuilder::__construct in core/modules/aggregator/src/FeedViewBuilder.php
Constructs a new FeedViewBuilder.

File

core/lib/Drupal/Core/Entity/EntityViewBuilder.php, line 81
Contains \Drupal\Core\Entity\EntityViewBuilder.

Class

EntityViewBuilder
Base class for entity view builders.

Namespace

Drupal\Core\Entity

Code

public function __construct(EntityTypeInterface $entity_type, EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager) {
  $this->entityTypeId = $entity_type
    ->id();
  $this->entityType = $entity_type;
  $this->entityManager = $entity_manager;
  $this->languageManager = $language_manager;
}