‪TYPO3CMS  9.5
FileStorageIndexingTask.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
22 {
28  public ‪$storageUid = -1;
29 
35  public function ‪execute()
36  {
37  if ((int)$this->storageUid > 0) {
39  $currentEvaluatePermissionsValue = $storage->‪getEvaluatePermissions();
40  $storage->setEvaluatePermissions(false);
41  $indexer = $this->‪getIndexer($storage);
42  $indexer->processChangesInStorages();
43  $storage->setEvaluatePermissions($currentEvaluatePermissionsValue);
44  }
45  return true;
46  }
47 
54  protected function ‪getIndexer(\‪TYPO3\CMS\Core\Resource\ResourceStorage $storage)
55  {
56  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\‪TYPO3\CMS\Core\Resource\Index\Indexer::class, $storage);
57  }
58 }
‪TYPO3\CMS\Core\Resource\ResourceStorage\getEvaluatePermissions
‪bool getEvaluatePermissions()
Definition: ResourceStorage.php:590
‪TYPO3
‪TYPO3\CMS\Scheduler\Task
Definition: AbstractTask.php:2
‪TYPO3\CMS\Scheduler\Task\FileStorageIndexingTask\execute
‪bool execute()
Definition: FileStorageIndexingTask.php:34
‪TYPO3\CMS\Core\Resource\ResourceFactory\getInstance
‪static ResourceFactory getInstance()
Definition: ResourceFactory.php:39
‪TYPO3\CMS\Scheduler\Task\AbstractTask
Definition: AbstractTask.php:32
‪TYPO3\CMS\Scheduler\Task\FileStorageIndexingTask
Definition: FileStorageIndexingTask.php:22
‪TYPO3\CMS\Scheduler\Task\FileStorageIndexingTask\getIndexer
‪TYPO3 CMS Core Resource Index Indexer getIndexer(\TYPO3\CMS\Core\Resource\ResourceStorage $storage)
Definition: FileStorageIndexingTask.php:53
‪TYPO3\CMS\Core\Resource\ResourceFactory\getStorageObject
‪ResourceStorage getStorageObject($uid, array $recordData=[], &$fileIdentifier=null)
Definition: ResourceFactory.php:131
‪TYPO3\CMS\Scheduler\Task\FileStorageIndexingTask\$storageUid
‪int $storageUid
Definition: FileStorageIndexingTask.php:27