public function CertificateController::__construct in Opigno certificate 8
Same name and namespace in other branches
- 3.x src/Controller/CertificateController.php \Drupal\opigno_certificate\Controller\CertificateController::__construct()
Creates a CertificateController object.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager: The entity manager.
\Drupal\Core\Render\RendererInterface $renderer: The renderer service.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
Overrides EntityViewController::__construct
File
- src/
Controller/ CertificateController.php, line 35
Class
- CertificateController
- Defines a controller to render a single opigno_certificate.
Namespace
Drupal\opigno_certificate\ControllerCode
public function __construct(EntityTypeManagerInterface $entity_manager, RendererInterface $renderer, AccountInterface $current_user) {
parent::__construct($entity_manager, $renderer);
$this->currentUser = $current_user ?: \Drupal::currentUser();
}