‪TYPO3CMS  ‪main
IsFileSelectableEvent.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 
21 
26 {
27  private bool ‪$isFileSelectable = true;
28 
29  public function ‪__construct(
30  private readonly ‪FileInterface $file,
31  ) {}
32 
33  public function ‪getFile(): ‪FileInterface
34  {
35  return $this->file;
36  }
37 
38  public function ‪isFileSelectable(): bool
39  {
41  }
42 
43  public function ‪allowFileSelection(): void
44  {
45  $this->‪isFileSelectable = true;
46  }
47 
48  public function ‪denyFileSelection(): void
49  {
50  $this->‪isFileSelectable = false;
51  }
52 }
‪TYPO3\CMS\Backend\ElementBrowser\Event
Definition: IsFileSelectableEvent.php:18
‪TYPO3\CMS\Core\Resource\FileInterface
Definition: FileInterface.php:26
‪TYPO3\CMS\Backend\ElementBrowser\Event\IsFileSelectableEvent
Definition: IsFileSelectableEvent.php:26
‪TYPO3\CMS\Backend\ElementBrowser\Event\IsFileSelectableEvent\__construct
‪__construct(private readonly FileInterface $file,)
Definition: IsFileSelectableEvent.php:29
‪TYPO3\CMS\Backend\ElementBrowser\Event\IsFileSelectableEvent\denyFileSelection
‪denyFileSelection()
Definition: IsFileSelectableEvent.php:48
‪TYPO3\CMS\Backend\ElementBrowser\Event\IsFileSelectableEvent\isFileSelectable
‪isFileSelectable()
Definition: IsFileSelectableEvent.php:38
‪TYPO3\CMS\Backend\ElementBrowser\Event\IsFileSelectableEvent\allowFileSelection
‪allowFileSelection()
Definition: IsFileSelectableEvent.php:43
‪TYPO3\CMS\Backend\ElementBrowser\Event\IsFileSelectableEvent\$isFileSelectable
‪bool $isFileSelectable
Definition: IsFileSelectableEvent.php:27
‪TYPO3\CMS\Backend\ElementBrowser\Event\IsFileSelectableEvent\getFile
‪getFile()
Definition: IsFileSelectableEvent.php:33