TYPO3 CMS  TYPO3_6-2
FileStorageIndexingTask.php
Go to the documentation of this file.
1 <?php
3 
21 
27  public $storageUid = -1;
28 
34  public function execute() {
35  if ((int)$this->storageUid > 0) {
36  $storage = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getStorageObject($this->storageUid);
37  $storage->setEvaluatePermissions(FALSE);
38  $indexer = $this->getIndexer($storage);
39  $indexer->processChangesInStorages();
40  $storage->setEvaluatePermissions(TRUE);
41  }
42  return TRUE;
43  }
44 
51  protected function getIndexer(\TYPO3\CMS\Core\Resource\ResourceStorage $storage) {
52  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Index\\Indexer', $storage);
53  }
54 
55 }
getIndexer(\TYPO3\CMS\Core\Resource\ResourceStorage $storage)