You are here

public function FileUploadHandler::__construct in Drupal 10

Constructs a FileUploadHandler object.

Parameters

\Drupal\Core\File\FileSystemInterface $fileSystem: The file system service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $streamWrapperManager: The stream wrapper manager.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher: The event dispatcher.

\Symfony\Component\Mime\MimeTypeGuesserInterface $mimeTypeGuesser: The MIME type guesser.

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

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

File

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

Class

FileUploadHandler
Handles validating and creating file entities from file uploads.

Namespace

Drupal\file\Upload

Code

public function __construct(FileSystemInterface $fileSystem, EntityTypeManagerInterface $entityTypeManager, StreamWrapperManagerInterface $streamWrapperManager, EventDispatcherInterface $eventDispatcher, MimeTypeGuesserInterface $mimeTypeGuesser, AccountInterface $currentUser, RequestStack $requestStack) {
  $this->fileSystem = $fileSystem;
  $this->entityTypeManager = $entityTypeManager;
  $this->streamWrapperManager = $streamWrapperManager;
  $this->eventDispatcher = $eventDispatcher;
  $this->mimeTypeGuesser = $mimeTypeGuesser;
  $this->currentUser = $currentUser;
  $this->requestStack = $requestStack;
}