‪TYPO3CMS  10.4
FileNameFilter.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
24 {
30  protected static ‪$showHiddenFilesAndFolders = false;
31 
45  public static function ‪filterHiddenFilesAndFolders($itemName, $itemIdentifier, $parentIdentifier, array $additionalInformation, ‪DriverInterface $driverInstance)
46  {
47  // Only apply the filter if you want to hide the hidden files
48  if (self::$showHiddenFilesAndFolders === false && strpos($itemIdentifier, '/.') !== false) {
49  return -1;
50  }
51  return true;
52  }
53 
60  public static function ‪getShowHiddenFilesAndFolders()
61  {
63  }
64 
73  {
74  return self::$showHiddenFilesAndFolders = (bool)‪$showHiddenFilesAndFolders;
75  }
76 }
‪TYPO3\CMS\Core\Resource\Driver\DriverInterface
Definition: DriverInterface.php:23
‪TYPO3\CMS\Core\Resource\Filter\FileNameFilter\getShowHiddenFilesAndFolders
‪static bool getShowHiddenFilesAndFolders()
Definition: FileNameFilter.php:59
‪TYPO3\CMS\Core\Resource\Filter\FileNameFilter\filterHiddenFilesAndFolders
‪static bool int filterHiddenFilesAndFolders($itemName, $itemIdentifier, $parentIdentifier, array $additionalInformation, DriverInterface $driverInstance)
Definition: FileNameFilter.php:44
‪TYPO3\CMS\Core\Resource\Filter\FileNameFilter\setShowHiddenFilesAndFolders
‪static bool setShowHiddenFilesAndFolders($showHiddenFilesAndFolders)
Definition: FileNameFilter.php:71
‪TYPO3\CMS\Core\Resource\Filter
Definition: FileExtensionFilter.php:16
‪TYPO3\CMS\Core\Resource\Filter\FileNameFilter\$showHiddenFilesAndFolders
‪static bool $showHiddenFilesAndFolders
Definition: FileNameFilter.php:29
‪TYPO3\CMS\Core\Resource\Filter\FileNameFilter
Definition: FileNameFilter.php:24