You are here

public function PrivateMessageController::__construct in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Controller/PrivateMessageController.php \Drupal\private_message\Controller\PrivateMessageController::__construct()

Constructs a PrivateMessageForm object.

Parameters

\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity manager service.

\Drupal\Core\Form\FormBuilderInterface $formBuilder: The form builder service.

\Drupal\user\UserDataInterface $userData: The user data service.

\Drupal\private_message\Service\PrivateMessageServiceInterface $privateMessageService: The private message service.

File

src/Controller/PrivateMessageController.php, line 74

Class

PrivateMessageController
Private message page controller. Returns render arrays for the page.

Namespace

Drupal\private_message\Controller

Code

public function __construct(AccountProxyInterface $currentUser, EntityTypeManagerInterface $entityTypeManager, FormBuilderInterface $formBuilder, UserDataInterface $userData, PrivateMessageServiceInterface $privateMessageService) {
  $this->currentUser = $currentUser;
  $this->entityTypeManager = $entityTypeManager;
  $this->formBuilder = $formBuilder;
  $this->userData = $userData;
  $this->privateMessageService = $privateMessageService;
  $this->userManager = $entityTypeManager
    ->getStorage('user');
}