public function PrivateMessageController::__construct in Private Message 8
Same name and namespace in other branches
- 8.2 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\EntityManagerInterface $entityManager: 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\ControllerCode
public function __construct(AccountProxyInterface $currentUser, EntityManagerInterface $entityManager, FormBuilderInterface $formBuilder, UserDataInterface $userData, PrivateMessageServiceInterface $privateMessageService) {
$this->currentUser = $currentUser;
$this->entityManager = $entityManager;
$this->formBuilder = $formBuilder;
$this->userData = $userData;
$this->privateMessageService = $privateMessageService;
$this->userManager = $entityManager
->getStorage('user');
}