public function CommentController::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/src/Controller/CommentController.php \Drupal\comment\Controller\CommentController::__construct()
- 9 core/modules/comment/src/Controller/CommentController.php \Drupal\comment\Controller\CommentController::__construct()
Constructs a CommentController object.
Parameters
\Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: HTTP kernel to handle requests.
\Drupal\comment\CommentManagerInterface $comment_manager: The comment manager service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager service.
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service.
File
- core/
modules/ comment/ src/ Controller/ CommentController.php, line 73
Class
- CommentController
- Controller for the comment entity.
Namespace
Drupal\comment\ControllerCode
public function __construct(HttpKernelInterface $http_kernel, CommentManagerInterface $comment_manager, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, EntityRepositoryInterface $entity_repository) {
$this->httpKernel = $http_kernel;
$this->commentManager = $comment_manager;
$this->entityTypeManager = $entity_type_manager;
$this->entityFieldManager = $entity_field_manager;
$this->entityRepository = $entity_repository;
}