public function GroupCoreCommentsController::__construct in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
- 8.8 modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
- 10.3.x modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
- 10.0.x modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
- 10.1.x modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
Constructs a new GroupCoreCommentsController.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The Entity type manager.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
File
- modules/
custom/ group_core_comments/ src/ Controller/ GroupCoreCommentsController.php, line 42
Class
- GroupCoreCommentsController
- Provides group core comments controllers.
Namespace
Drupal\group_core_comments\ControllerCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, AccountInterface $current_user, RequestStack $request_stack, MessengerInterface $messenger, TranslationInterface $string_translation) {
$this->entityTypeManager = $entity_type_manager;
$this->currentUser = $current_user;
$this->requestService = $request_stack;
$this
->setMessenger($messenger);
$this
->setStringTranslation($string_translation);
}