public function CommentViewBuilder::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/src/CommentViewBuilder.php \Drupal\comment\CommentViewBuilder::__construct()
- 9 core/modules/comment/src/CommentViewBuilder.php \Drupal\comment\CommentViewBuilder::__construct()
Constructs a new CommentViewBuilder.
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\Session\AccountInterface $current_user: The current user.
\Drupal\Core\Theme\Registry $theme_registry: The theme registry.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
Overrides EntityViewBuilder::__construct
File
- core/
modules/ comment/ src/ CommentViewBuilder.php, line 54
Class
- CommentViewBuilder
- View builder handler for comments.
Namespace
Drupal\commentCode
public function __construct(EntityTypeInterface $entity_type, EntityRepositoryInterface $entity_repository, LanguageManagerInterface $language_manager, AccountInterface $current_user, Registry $theme_registry, EntityDisplayRepositoryInterface $entity_display_repository, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($entity_type, $entity_repository, $language_manager, $theme_registry, $entity_display_repository);
$this->currentUser = $current_user;
$this->entityTypeManager = $entity_type_manager;
}