public function EntityViewBuilder::__construct in Drupal 9
Same name and namespace in other branches
- 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\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.
- FeedViewBuilder::__construct in core/
modules/ aggregator/ src/ FeedViewBuilder.php - Constructs a new FeedViewBuilder.
2 methods override EntityViewBuilder::__construct()
- 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 97
Class
- EntityViewBuilder
- Base class for entity view builders.
Namespace
Drupal\Core\EntityCode
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;
}