function FileUploadHandler::__construct

File

core/modules/file/src/Upload/FileUploadHandler.php, line 43

Class

FileUploadHandler
Handles validating and creating file entities from file uploads.

Namespace

Drupal\file\Upload

Code

public function __construct(protected FileSystemInterface $fileSystem, protected EntityTypeManagerInterface $entityTypeManager, protected StreamWrapperManagerInterface $streamWrapperManager, protected EventDispatcherInterface $eventDispatcher, #[Autowire(service: 'file.mime_type.guesser')] protected MimeTypeGuesserInterface $mimeTypeGuesser, protected AccountInterface $currentUser, protected RequestStack $requestStack, protected FileRepositoryInterface $fileRepository, protected FileValidatorInterface $file_validator, #[Autowire(service: 'lock')] protected LockBackendInterface $lock, protected BasicRecursiveValidatorFactory $validatorFactory) {
  $this->fileSystem = $fileSystem;
  $this->entityTypeManager = $entityTypeManager;
  $this->streamWrapperManager = $streamWrapperManager;
  $this->eventDispatcher = $eventDispatcher;
  $this->mimeTypeGuesser = $mimeTypeGuesser;
  $this->currentUser = $currentUser;
  $this->requestStack = $requestStack;
  $this->fileRepository = $fileRepository;
  $this->fileValidator = $file_validator;
}

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