You are here

public function GroupCoreCommentsController::__construct in Open Social 8.9

Same name and namespace in other branches
  1. 8.8 modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
  2. 10.3.x modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
  3. 10.0.x modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
  4. 10.1.x modules/custom/group_core_comments/src/Controller/GroupCoreCommentsController.php \Drupal\group_core_comments\Controller\GroupCoreCommentsController::__construct()
  5. 10.2.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\Controller

Code

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);
}