TYPO3
7.6
|
Public Member Functions | |
__construct (\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher=null) | |
convertFlexFormDataToConfigurationArray ($flexFormData) | |
createStorageObject (array $storageRecord, array $storageConfiguration=null) | |
createFolderObject (ResourceStorage $storage, $identifier, $name) | |
getFileObject ($uid, array $fileData=array()) | |
getFileObjectFromCombinedIdentifier ($identifier) | |
getFileObjectByStorageAndIdentifier ($storageUid, &$fileIdentifier) | |
retrieveFileOrFolderObject ($input) | |
getFolderObjectFromCombinedIdentifier ($identifier) | |
getStorageObjectFromCombinedIdentifier ($identifier) | |
getObjectFromCombinedIdentifier ($identifier) | |
getFileReferenceObject ($uid, array $fileReferenceData=array(), $raw=false) | |
Static Public Member Functions | |
static | getInstance () |
Protected Member Functions | |
emitPostProcessStorageSignal (ResourceStorage $storageObject) | |
findBestMatchingStorageByLocalPath (&$localPath) | |
getFileIndexRepository () | |
getProcessedFileRepository () | |
getIndexer (ResourceStorage $storage) | |
Protected Attributes | |
$storageInstances = array() | |
$collectionInstances = array() | |
$fileInstances = array() | |
$fileReferenceInstances = array() | |
$localDriverStorageCache = null | |
$signalSlotDispatcher | |
Additional Inherited Members | |
Public Attributes inherited from ResourceFactoryInterface | |
const | SIGNAL_PostProcessStorage = 'postProcessStorage' |
Factory class for FAL objects
Definition at line 26 of file ResourceFactory.php.
__construct | ( | \TYPO3\CMS\Extbase\SignalSlot\Dispatcher | $signalSlotDispatcher = null | ) |
Inject signal slot dispatcher
Definition at line 73 of file ResourceFactory.php.
References ResourceFactory\$signalSlotDispatcher, and GeneralUtility\makeInstance().
convertFlexFormDataToConfigurationArray | ( | $flexFormData | ) |
Converts a flexform data string to a flat array with key value pairs
string | $flexFormData |
Definition at line 247 of file ResourceFactory.php.
References GeneralUtility\xml2array().
Referenced by ResourceFactory\createStorageObject().
createFolderObject | ( | ResourceStorage | $storage, |
$identifier, | |||
$name | |||
) |
Creates a folder to directly access (a part of) a storage.
ResourceStorage | $storage | The storage the folder belongs to |
string | $identifier | The path to the folder. Might also be a simple unique string, depending on the storage driver. |
string | $name | The name of the folder (e.g. the folder name) |
Definition at line 333 of file ResourceFactory.php.
References GeneralUtility\makeInstance().
createStorageObject | ( | array | $storageRecord, |
array | $storageConfiguration = null |
||
) |
Creates a storage object from a storage database row.
array | $storageRecord | |
array | $storageConfiguration | Storage configuration (if given, this won't be extracted from the FlexForm value but the supplied array used instead) |
Definition at line 314 of file ResourceFactory.php.
References ResourceFactory\convertFlexFormDataToConfigurationArray(), and GeneralUtility\makeInstance().
|
protected |
Emits a signal after a resource storage was initialized
ResourceStorage | $storageObject |
Definition at line 183 of file ResourceFactory.php.
|
protected |
Checks whether a file resides within a real storage in local file system. If no match is found, uid 0 is returned which is a fallback storage pointing to PATH_site.
The file identifier is adapted accordingly to match the new storage's base path.
string | $localPath |
Definition at line 198 of file ResourceFactory.php.
References PathUtility\getCommonPrefix().
|
protected |
Returns an instance of the FileIndexRepository
Definition at line 643 of file ResourceFactory.php.
References FileIndexRepository\getInstance().
Referenced by ResourceFactory\getFileObject(), and ResourceFactory\getFileObjectByStorageAndIdentifier().
getFileObject | ( | $uid, | |
array | $fileData = array() |
||
) |
Creates an instance of the file given UID. The $fileData can be supplied to increase performance.
int | $uid | The uid of the file to instantiate. |
array | $fileData | The record row from database. |
\InvalidArgumentException | |
\TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException |
Definition at line 349 of file ResourceFactory.php.
References ResourceFactory\getFileIndexRepository().
Referenced by ResourceFactory\getFileObjectByStorageAndIdentifier(), and ResourceFactory\retrieveFileOrFolderObject().
getFileObjectByStorageAndIdentifier | ( | $storageUid, | |
& | $fileIdentifier | ||
) |
Gets an file object from storage by file identifier If the file is outside of the process folder it gets indexed and returned as file object afterwards If the file is within processing folder the file object will be directly returned
int | $storageUid | |
string | $fileIdentifier |
Definition at line 404 of file ResourceFactory.php.
References ResourceFactory\getFileIndexRepository(), ResourceFactory\getFileObject(), ResourceFactory\getIndexer(), and ResourceFactory\getProcessedFileRepository().
Referenced by ResourceFactory\getFileObjectFromCombinedIdentifier().
getFileObjectFromCombinedIdentifier | ( | $identifier | ) |
Gets an file object from an identifier [storage]:[fileId]
string | $identifier |
\InvalidArgumentException |
Definition at line 374 of file ResourceFactory.php.
References ResourceFactory\getFileObjectByStorageAndIdentifier(), and GeneralUtility\trimExplode().
Referenced by ResourceFactory\retrieveFileOrFolderObject().
getFileReferenceObject | ( | $uid, | |
array | $fileReferenceData = array() , |
||
$raw = false |
|||
) |
Creates an instance of a FileReference object. The $fileReferenceData can be supplied to increase performance.
int | $uid | The uid of the file usage (sys_file_reference) to instantiate. |
array | $fileReferenceData | The record row from database. |
bool | $raw | Whether to get raw results without performing overlays |
\InvalidArgumentException | |
\TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException |
Definition at line 579 of file ResourceFactory.php.
getFolderObjectFromCombinedIdentifier | ( | $identifier | ) |
Gets a folder object from an identifier [storage]:[fileId]
check naming, inserted by SteffenR while working on filelist
string | $identifier |
Definition at line 489 of file ResourceFactory.php.
References GeneralUtility\isFirstPartOfStr(), and GeneralUtility\trimExplode().
Referenced by ResourceFactory\retrieveFileOrFolderObject().
|
protected |
Returns an instance of the Indexer
Definition at line 663 of file ResourceFactory.php.
References GeneralUtility\makeInstance().
Referenced by ResourceFactory\getFileObjectByStorageAndIdentifier().
|
static |
Gets a singleton instance of this class.
Definition at line 33 of file ResourceFactory.php.
References GeneralUtility\makeInstance().
Referenced by ResourceStorage\__construct(), ContentObjectRenderer\__wakeup(), ResourceStorage\addFile(), ResourceStorage\addFileMount(), OnlineMediaController\addMediaFromUrl(), FileLinkHandler\canHandleLink(), FileMetadataPermissionsAspect\checkFileWriteAccessForFileMetaData(), ResourceStorage\createFile(), ShortcutToolbarItem\createShortcutAction(), FileDumpController\dumpAction(), ImportExport\export_addFilesFromSysFilesRecords(), ImageManipulationElement\getFile(), ResourceStorage\getFolder(), DefaultAvatarProvider\getImage(), MetaInformation\getPath(), ResourceStorage\getProcessingFolder(), MetaInformation\getRecordInformation(), ReferenceIndex\getRelations_procFiles(), AbstractOnlineMediaHelper\getResourceFactory(), DataHandler\getResourceFactory(), ResourceStorage\getRootLevelFolder(), ImageManipulationWizard\getWizardAction(), ContentObjectRenderer\imageLinkWrap(), FileUploadController\init(), ReplaceFileController\init(), CreateFolderController\init(), EditFileController\init(), ElementInformationController\initFileOrFolderRecord(), ShowImageController\initialize(), SelectImage\main_rte(), Clipboard\printContentFromTab(), ClickMenu\printFileClickMenu(), FileInfoHook\renderFileInfo(), FileInfoHook\renderFileMetadataInfo(), InlineRecordContainer\renderForeignRecordHeader(), SetupModuleController\setAvatarFileUid(), ExtendedFileUtility\start(), FileList\start(), File\updateProperties(), FileStorageIndexingAdditionalFieldProvider\validateAdditionalFields(), and FileStorageExtractionAdditionalFieldProvider\validateAdditionalFields().
getObjectFromCombinedIdentifier | ( | $identifier | ) |
Gets a file or folder object.
string | $identifier |
\TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException |
Definition at line 532 of file ResourceFactory.php.
References elseif, and GeneralUtility\trimExplode().
Referenced by ResourceFactory\retrieveFileOrFolderObject().
|
protected |
Returns an instance of the ProcessedFileRepository
Definition at line 653 of file ResourceFactory.php.
References GeneralUtility\makeInstance().
Referenced by ResourceFactory\getFileObjectByStorageAndIdentifier().
getStorageObjectFromCombinedIdentifier | ( | $identifier | ) |
Gets a storage object from a combined identifier
string | $identifier | An identifier of the form [storage uid]:[object identifier] |
Definition at line 517 of file ResourceFactory.php.
References GeneralUtility\trimExplode().
retrieveFileOrFolderObject | ( | $input | ) |
Bulk function, can be used for anything to get a file or folder
Files, previously laid on fileadmin/ or something, will be "mapped" to the storage the file is in now. Files like typo3temp/ or typo3conf/ will be moved to the first writable storage in its processing folder
$input could be
string | $input |
Definition at line 441 of file ResourceFactory.php.
References PathUtility\basename(), MathUtility\canBeInterpretedAsInteger(), PathUtility\dirname(), elseif, GeneralUtility\getFileAbsFileName(), ResourceFactory\getFileObject(), ResourceFactory\getFileObjectFromCombinedIdentifier(), ResourceFactory\getFolderObjectFromCombinedIdentifier(), ResourceFactory\getObjectFromCombinedIdentifier(), PathUtility\getRelativePath(), and GeneralUtility\isFirstPartOfStr().
|
protected |
Definition at line 46 of file ResourceFactory.php.
|
protected |
Definition at line 51 of file ResourceFactory.php.
|
protected |
Definition at line 56 of file ResourceFactory.php.
|
protected |
Definition at line 63 of file ResourceFactory.php.
|
protected |
Definition at line 68 of file ResourceFactory.php.
Referenced by ResourceFactory\__construct().
|
protected |
Definition at line 41 of file ResourceFactory.php.