‪TYPO3CMS  ‪main
BeforeFileAddedEvent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use TYPO3\CMS\Core\Resource\Driver\DriverInterface;
23 
30 {
31  public function ‪__construct(
32  private string $fileName,
33  private readonly string $sourceFilePath,
34  private readonly ‪Folder $targetFolder,
35  private readonly ‪ResourceStorage $storage,
36  private readonly DriverInterface $driver
37  ) {}
38 
39  public function ‪getFileName(): string
40  {
41  return $this->fileName;
42  }
43 
44  public function ‪setFileName(string $fileName): void
45  {
46  $this->fileName = $fileName;
47  }
48 
49  public function ‪getSourceFilePath(): string
50  {
51  return $this->sourceFilePath;
52  }
53 
54  public function ‪getTargetFolder(): ‪Folder
55  {
56  return $this->targetFolder;
57  }
58 
59  public function ‪getStorage(): ‪ResourceStorage
60  {
61  return $this->storage;
62  }
63 
64  public function ‪getDriver(): DriverInterface
65  {
66  return $this->driver;
67  }
68 }
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent\__construct
‪__construct(private string $fileName, private readonly string $sourceFilePath, private readonly Folder $targetFolder, private readonly ResourceStorage $storage, private readonly DriverInterface $driver)
Definition: BeforeFileAddedEvent.php:31
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent\getDriver
‪getDriver()
Definition: BeforeFileAddedEvent.php:64
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent\getStorage
‪getStorage()
Definition: BeforeFileAddedEvent.php:59
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent\getSourceFilePath
‪getSourceFilePath()
Definition: BeforeFileAddedEvent.php:49
‪TYPO3\CMS\Core\Resource\Folder
Definition: Folder.php:38
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent\getFileName
‪getFileName()
Definition: BeforeFileAddedEvent.php:39
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent
Definition: BeforeFileAddedEvent.php:30
‪TYPO3\CMS\Core\Resource\Event
Definition: AfterDefaultUploadFolderWasResolvedEvent.php:18
‪TYPO3\CMS\Core\Resource\ResourceStorage
Definition: ResourceStorage.php:129
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent\getTargetFolder
‪getTargetFolder()
Definition: BeforeFileAddedEvent.php:54
‪TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent\setFileName
‪setFileName(string $fileName)
Definition: BeforeFileAddedEvent.php:44