function CommentController::__construct
Same name and namespace in other branches
- 11.x core/modules/comment/src/Controller/CommentController.php \Drupal\comment\Controller\CommentController::__construct()
- 10 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()
- 8.9.x core/modules/comment/src/Controller/CommentController.php \Drupal\comment\Controller\CommentController::__construct()
Constructs a CommentController object.
Parameters
\Symfony\Component\HttpKernel\HttpKernelInterface $httpKernel: HTTP kernel to handle requests.
\Drupal\comment\CommentManagerInterface $commentManager: The comment manager service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
\Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager: The entity field manager service.
\Drupal\Core\Entity\EntityRepositoryInterface $entityRepository: The entity repository service.
File
-
core/
modules/ comment/ src/ Controller/ CommentController.php, line 43
Class
- CommentController
- Controller for the comment entity.
Namespace
Drupal\comment\ControllerCode
public function __construct(protected HttpKernelInterface $httpKernel, protected CommentManagerInterface $commentManager, EntityTypeManagerInterface $entity_type_manager, protected EntityFieldManagerInterface $entityFieldManager, protected EntityRepositoryInterface $entityRepository) {
$this->entityTypeManager = $entity_type_manager;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.