You are here

public function FileUpload::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/Controller/FileUpload.php \Drupal\jsonapi\Controller\FileUpload::__construct()

Creates a new FileUpload instance.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Entity\EntityFieldManagerInterface $field_manager: The entity field manager.

\Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader $file_uploader: The file uploader.

\Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: An HTTP kernel for making subrequests.

File

core/modules/jsonapi/src/Controller/FileUpload.php, line 84

Class

FileUpload
Handles file upload requests.

Namespace

Drupal\jsonapi\Controller

Code

public function __construct(AccountInterface $current_user, EntityFieldManagerInterface $field_manager, TemporaryJsonapiFileFieldUploader $file_uploader, HttpKernelInterface $http_kernel) {
  $this->currentUser = $current_user;
  $this->fieldManager = $field_manager;
  $this->fileUploader = $file_uploader;
  $this->httpKernel = $http_kernel;
}