/**
  * Initialize the storage repository.
  */
 public function init()
 {
     $this->storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
     $this->storages = $this->storageRepository->findAll();
     // Add default storage for core files
     $this->storages[] = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getStorageObject(0);
 }
 /**
  * @return \TYPO3\CMS\Core\Resource\ResourceStorage
  */
 protected function getDefaultStorage()
 {
     // Get the first storage available.
     // Notice if no storage is found, a storage is created on the fly.
     $storages = $this->storageRepository->findAll();
     // Makes sure to return a storage having a local driver
     foreach ($storages as $storage) {
     }
     /** @var $storage \TYPO3\CMS\Core\Resource\ResourceStorage */
     return $storages[0];
 }
Exemplo n.º 3
0
 /**
  * Performs the database and folder update.
  *
  * @param array &$dbQueries Queries done in this update
  * @param mixed &$customMessages Custom messages
  * @return boolean TRUE on success, FALSE on error
  */
 public function performUpdate(array &$dbQueries, &$customMessages)
 {
     $this->init();
     $this->migrateAbsoluteFilemounts();
     $this->migrateRelativeFilemounts();
     if (is_array($this->sqlQueries) && is_array($dbQueries)) {
         $dbQueries = array_merge($dbQueries, $this->sqlQueries);
     }
     // Initialize processing folders for all storages
     foreach ($this->storageRepository->findAll() as $storage) {
         $storage->getProcessingFolders();
     }
     $this->markWizardAsDone();
     return TRUE;
 }
 /**
  * Initialize the storage repository.
  */
 public function init()
 {
     $this->storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
     $storages = $this->storageRepository->findAll();
     $this->storage = $storages[0];
 }