function CKEditor5ImageController::__construct
Same name and namespace in other branches
- 9 core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php \Drupal\ckeditor5\Controller\CKEditor5ImageController::__construct()
- 11.x core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php \Drupal\ckeditor5\Controller\CKEditor5ImageController::__construct()
Constructs a new CKEditor5ImageController.
Parameters
\Drupal\Core\File\FileSystemInterface $fileSystem: The file upload handler.
\Drupal\Core\Session\AccountInterface|\Drupal\file\Upload\FileUploadHandler $fileUploadHandler: The currently authenticated user.
\Symfony\Component\Mime\MimeTypeGuesserInterface|\Drupal\Core\Lock\LockBackendInterface $mime_type_guesser: The MIME type guesser.
\Drupal\Core\Lock\LockBackendInterface|null $lock: The lock service.
\Symfony\Contracts\EventDispatcher\EventDispatcherInterface|null $event_dispatcher: The event dispatcher.
\Drupal\file\Validation\FileValidatorInterface|null $file_validator: The file validator.
File
-
core/
modules/ ckeditor5/ src/ Controller/ CKEditor5ImageController.php, line 74
Class
- CKEditor5ImageController
- Returns response for CKEditor 5 Simple image upload adapter.
Namespace
Drupal\ckeditor5\ControllerCode
public function __construct(FileSystemInterface $fileSystem, AccountInterface|FileUploadHandler $fileUploadHandler, MimeTypeGuesserInterface|LockBackendInterface $mime_type_guesser, LockBackendInterface $lock = NULL, EventDispatcherInterface $event_dispatcher = NULL, FileValidatorInterface $file_validator = NULL) {
$this->fileSystem = $fileSystem;
if ($fileUploadHandler instanceof AccountInterface) {
@trigger_error('Calling ' . __METHOD__ . '() with the $current_user argument is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3388990', E_USER_DEPRECATED);
$fileUploadHandler = \Drupal::service('file.upload_handler');
}
$this->fileUploadHandler = $fileUploadHandler;
if ($mime_type_guesser instanceof MimeTypeGuesserInterface) {
@trigger_error('Calling ' . __METHOD__ . '() with the $mime_type_guesser argument is deprecated in drupal:10.3.0 and is replaced with $lock from drupal:11.0.0. See https://www.drupal.org/node/3388990', E_USER_DEPRECATED);
$mime_type_guesser = \Drupal::service('lock');
}
$this->lock = $mime_type_guesser;
if ($lock) {
@trigger_error('Calling ' . __METHOD__ . '() with the $lock argument in position 4 is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3388990', E_USER_DEPRECATED);
}
if ($event_dispatcher) {
@trigger_error('Calling ' . __METHOD__ . '() with the $event_dispatcher argument is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3388990', E_USER_DEPRECATED);
}
if ($file_validator) {
@trigger_error('Calling ' . __METHOD__ . '() with the $file_validator argument is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3388990', E_USER_DEPRECATED);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.