function CKEditor5MediaController::__construct

Same name and namespace in other branches
  1. 11.x core/modules/ckeditor5/src/Controller/CKEditor5MediaController.php \Drupal\ckeditor5\Controller\CKEditor5MediaController::__construct()
  2. 10 core/modules/ckeditor5/src/Controller/CKEditor5MediaController.php \Drupal\ckeditor5\Controller\CKEditor5MediaController::__construct()
  3. 9 core/modules/ckeditor5/src/Controller/CKEditor5MediaController.php \Drupal\ckeditor5\Controller\CKEditor5MediaController::__construct()

Constructs a new CKEditor5MediaController.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The currently authenticated user.

\Drupal\Core\Entity\EntityRepositoryInterface $entityRepository: The entity repository.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.

File

core/modules/ckeditor5/src/Controller/CKEditor5MediaController.php, line 49

Class

CKEditor5MediaController
Provides an API for checking if a media entity has image field.

Namespace

Drupal\ckeditor5\Controller

Code

public function __construct(AccountInterface $current_user, protected EntityRepositoryInterface $entityRepository, protected RequestStack $requestStack) {
  $this->currentUser = $current_user;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.