FileHandlingUtility implements SingletonInterface, LoggerAwareInterface uses LoggerAwareTrait
Utility for dealing with files and folders
This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
- LoggerAwareInterface
Properties
- $emConfUtility : EmConfUtility
- $installUtility : InstallUtility
- $languageService : LanguageService|null
- $languageServiceFactory : LanguageServiceFactory
Methods
- getExtensionDir() : string
- Returns the installation directory for an extension depending on the installation scope
- initializeObject() : mixed
- Initialize method - loads language file
- injectEmConfUtility() : mixed
- injectInstallUtility() : mixed
- injectLanguageServiceFactory() : mixed
- removeDirectory() : mixed
- Remove specified directory
- unpackExtensionFromExtensionDataArray() : mixed
- Unpack an extension in t3x data format and write files
- unzipExtensionFromFile() : mixed
- Unzip an extension.zip.
- addDirectory() : mixed
- Add specified directory
- createDirectoriesForExtensionFiles() : mixed
- Loops over an array of directories and creates them in the given root path It also creates nested directory structures
- createNestedDirectory() : mixed
- Wrapper for utility method to create directory recursively
- extractDirectoriesFromExtensionData() : array<string|int, mixed>
- Extract needed directories from given extensionDataFilesArray
- getRelativePath() : string
- Returns relative path
- makeAndClearExtensionDir() : string
- Removes the current extension of $type and creates the base folder for the new one (which is going to be imported)
- reloadPackageInformation() : mixed
- writeEmConfToFile() : mixed
- Constructs emConf and writes it to corresponding file
- writeExtensionFiles() : mixed
- Loops over an array of files and writes them to the given rootPath
Properties
$emConfUtility
protected
EmConfUtility
$emConfUtility
$installUtility
protected
InstallUtility
$installUtility
$languageService
protected
LanguageService|null
$languageService
= null
$languageServiceFactory
protected
LanguageServiceFactory
$languageServiceFactory
Methods
getExtensionDir()
Returns the installation directory for an extension depending on the installation scope
public
getExtensionDir(string $extensionKey[, string $pathType = 'Local' ]) : string
Parameters
- $extensionKey : string
- $pathType : string = 'Local'
-
Extension installation scope (Local,Global,System)
Tags
Return values
stringinitializeObject()
Initialize method - loads language file
public
initializeObject() : mixed
injectEmConfUtility()
public
injectEmConfUtility(EmConfUtility $emConfUtility) : mixed
Parameters
- $emConfUtility : EmConfUtility
injectInstallUtility()
public
injectInstallUtility(InstallUtility $installUtility) : mixed
Parameters
- $installUtility : InstallUtility
injectLanguageServiceFactory()
public
injectLanguageServiceFactory(LanguageServiceFactory $languageServiceFactory) : mixed
Parameters
- $languageServiceFactory : LanguageServiceFactory
removeDirectory()
Remove specified directory
public
removeDirectory(string $extDirPath) : mixed
Parameters
- $extDirPath : string
Tags
unpackExtensionFromExtensionDataArray()
Unpack an extension in t3x data format and write files
public
unpackExtensionFromExtensionDataArray(string $extensionKey, array<string|int, mixed> $extensionData[, string $pathType = 'Local' ]) : mixed
Parameters
- $extensionKey : string
- $extensionData : array<string|int, mixed>
- $pathType : string = 'Local'
unzipExtensionFromFile()
Unzip an extension.zip.
public
unzipExtensionFromFile(string $file, string $fileName[, string $pathType = 'Local' ]) : mixed
Parameters
- $file : string
-
path to zip file
- $fileName : string
-
file name
- $pathType : string = 'Local'
-
path type (Local, Global, System)
Tags
addDirectory()
Add specified directory
protected
addDirectory(string $extDirPath) : mixed
Parameters
- $extDirPath : string
Tags
createDirectoriesForExtensionFiles()
Loops over an array of directories and creates them in the given root path It also creates nested directory structures
protected
createDirectoriesForExtensionFiles(array<string|int, mixed> $directories, string $rootPath) : mixed
Parameters
- $directories : array<string|int, mixed>
- $rootPath : string
createNestedDirectory()
Wrapper for utility method to create directory recursively
protected
createNestedDirectory(string $directory) : mixed
Parameters
- $directory : string
-
Absolute path
Tags
extractDirectoriesFromExtensionData()
Extract needed directories from given extensionDataFilesArray
protected
extractDirectoriesFromExtensionData(array<string|int, mixed> $files) : array<string|int, mixed>
Parameters
- $files : array<string|int, mixed>
Return values
array<string|int, mixed>getRelativePath()
Returns relative path
protected
getRelativePath(string $absolutePath) : string
Parameters
- $absolutePath : string
Return values
stringmakeAndClearExtensionDir()
Removes the current extension of $type and creates the base folder for the new one (which is going to be imported)
protected
makeAndClearExtensionDir(string $extensionKey[, string $pathType = 'Local' ]) : string
Parameters
- $extensionKey : string
- $pathType : string = 'Local'
-
Extension installation scope (Local,Global,System)
Tags
Return values
stringreloadPackageInformation()
protected
reloadPackageInformation(string $extensionKey) : mixed
Parameters
- $extensionKey : string
writeEmConfToFile()
Constructs emConf and writes it to corresponding file
protected
writeEmConfToFile(string $extensionKey, array<string|int, mixed> $emConfData, string $rootPath) : mixed
Parameters
- $extensionKey : string
- $emConfData : array<string|int, mixed>
- $rootPath : string
writeExtensionFiles()
Loops over an array of files and writes them to the given rootPath
protected
writeExtensionFiles(array<string|int, mixed> $files, string $rootPath) : mixed
Parameters
- $files : array<string|int, mixed>
- $rootPath : string