public function FileUpload::__construct in JSON:API 8.2
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
- src/
Controller/ FileUpload.php, line 84
Class
- FileUpload
- Handles file upload requests.
Namespace
Drupal\jsonapi\ControllerCode
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;
}