TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
InstallUtility Class Reference
Inheritance diagram for InstallUtility:
SingletonInterface

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager)
 
 injectInstallToolSqlParser (\TYPO3\CMS\Install\Service\SqlSchemaMigrationService $installToolSqlParser)
 
 injectDependencyUtility (\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility $dependencyUtility)
 
 injectFileHandlingUtility (\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility $fileHandlingUtility)
 
 injectListUtility (\TYPO3\CMS\Extensionmanager\Utility\ListUtility $listUtility)
 
 injectDatabaseUtility (\TYPO3\CMS\Extensionmanager\Utility\DatabaseUtility $databaseUtility)
 
 injectExtensionRepository (\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository)
 
 injectPackageManager (\TYPO3\CMS\Core\Package\PackageManager $packageManager)
 
 injectCacheManager (\TYPO3\CMS\Core\Cache\CacheManager $cacheManager)
 
 injectSignalSlotDispatcher (\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher)
 
 injectRegistry (\TYPO3\CMS\Core\Registry $registry)
 
 install ($extensionKey)
 
 processExtensionSetup ($extensionKey)
 
 uninstall ($extensionKey)
 
 isLoaded ($extensionKey)
 
 reloadAvailableExtensions ()
 
 isAvailable ($extensionKey)
 
 reloadPackageInformation ($extensionKey)
 
 enrichExtensionWithDetails ($extensionKey, $loadTerInformation=true)
 
 processDatabaseUpdates (array $extension)
 
 reloadCaches ()
 
 updateDbWithExtTablesSql ($rawDefinitions)
 
 importStaticSql ($rawDefinitions)
 
 removeExtension ($extension)
 
 getExtensionSqlDataDump ($extension)
 
 isUpdateAvailable (Extension $extensionData)
 

Public Attributes

 $objectManager
 
 $installToolSqlParser
 
 $extensionRepository
 

Protected Member Functions

 loadExtension ($extensionKey)
 
 unloadExtension ($extensionKey)
 
 emitAfterExtensionInstallSignal ($extensionKey)
 
 emitAfterExtensionUninstallSignal ($extensionKey)
 
 getExtensionArray ($extensionKey)
 
 ensureConfiguredDirectoriesExist (array $extension)
 
 processRuntimeDatabaseUpdates ($extensionKey)
 
 emitTablesDefinitionIsBeingBuiltSignal ($extensionKey)
 
 reloadOpcache ()
 
 getSqlDataDumpForFile ($sqlFile)
 
 emitAfterExtensionT3DImportSignal ($importFileToUse, $importResult)
 
 importStaticSqlFile ($extensionSiteRelPath)
 
 emitAfterExtensionStaticSqlImportSignal ($extTablesStaticSqlRelFile)
 
 importInitialFiles ($extensionSiteRelPath, $extensionKey)
 
 emitAfterExtensionFileImportSignal ($destinationAbsolutePath)
 

Protected Attributes

 $dependencyUtility
 
 $fileHandlingUtility
 
 $listUtility
 
 $databaseUtility
 
 $packageManager
 
 $cacheManager
 
 $signalSlotDispatcher
 
 $registry
 

Detailed Description

Extension Manager Install Utility

Definition at line 28 of file InstallUtility.php.

Member Function Documentation

emitAfterExtensionFileImportSignal (   $destinationAbsolutePath)
protected

Emits a signal after extension files were imported

Parameters
string$destinationAbsolutePath

Definition at line 729 of file InstallUtility.php.

Referenced by InstallUtility\importInitialFiles().

emitAfterExtensionInstallSignal (   $extensionKey)
protected

Emits a signal after an extension has been installed

Parameters
string$extensionKey

Definition at line 281 of file InstallUtility.php.

Referenced by InstallUtility\install().

emitAfterExtensionStaticSqlImportSignal (   $extTablesStaticSqlRelFile)
protected

Emits a signal after a static sql file was imported

Parameters
string$extTablesStaticSqlRelFile

Definition at line 692 of file InstallUtility.php.

Referenced by InstallUtility\importStaticSqlFile().

emitAfterExtensionT3DImportSignal (   $importFileToUse,
  $importResult 
)
protected

Emits a signal after an t3d file was imported

Parameters
string$importFileToUse
int$importResult

Definition at line 661 of file InstallUtility.php.

emitAfterExtensionUninstallSignal (   $extensionKey)
protected

Emits a signal after an extension has been uninstalled

Parameters
string$extensionKey

Definition at line 291 of file InstallUtility.php.

Referenced by InstallUtility\unloadExtension().

emitTablesDefinitionIsBeingBuiltSignal (   $extensionKey)
protected

Emits a signal to manipulate the tables definitions

Parameters
string$extensionKey
Returns
mixed
Exceptions
ExtensionManagerException

Definition at line 426 of file InstallUtility.php.

Referenced by InstallUtility\processRuntimeDatabaseUpdates().

enrichExtensionWithDetails (   $extensionKey,
  $loadTerInformation = true 
)

Fetch additional information for an extension key

Parameters
string$extensionKey
bool$loadTerInformationprivate
Returns
array
Exceptions
ExtensionManagerException

Definition at line 333 of file InstallUtility.php.

References InstallUtility\getExtensionArray().

Referenced by InstallUtility\getExtensionSqlDataDump(), InstallUtility\install(), and InstallUtility\processExtensionSetup().

ensureConfiguredDirectoriesExist ( array  $extension)
protected

Creates directories as requested in ext_emconf.php

Parameters
array$extension

Definition at line 372 of file InstallUtility.php.

Referenced by InstallUtility\processExtensionSetup().

getExtensionArray (   $extensionKey)
protected
Parameters
string$extensionKey
Returns
array
Exceptions
ExtensionManagerException

Definition at line 357 of file InstallUtility.php.

Referenced by InstallUtility\enrichExtensionWithDetails().

getExtensionSqlDataDump (   $extension)

Get the data dump for an extension

Parameters
string$extension
Returns
array

Definition at line 539 of file InstallUtility.php.

References InstallUtility\enrichExtensionWithDetails(), and InstallUtility\getSqlDataDumpForFile().

getSqlDataDumpForFile (   $sqlFile)
protected

Gets the sql data dump for a specific sql file (for example ext_tables.sql)

Parameters
string$sqlFile
Returns
string

Definition at line 554 of file InstallUtility.php.

Referenced by InstallUtility\getExtensionSqlDataDump().

importInitialFiles (   $extensionSiteRelPath,
  $extensionKey 
)
protected

Imports files from Initialisation/Files to fileadmin via lowlevel copy directory method

Parameters
string$extensionSiteRelPathrelative path to extension dir
string$extensionKey

Definition at line 704 of file InstallUtility.php.

References $GLOBALS, GeneralUtility\copyDirectory(), InstallUtility\emitAfterExtensionFileImportSignal(), GeneralUtility\isAllowedAbsPath(), and GeneralUtility\mkdir().

Referenced by InstallUtility\processExtensionSetup().

importStaticSql (   $rawDefinitions)

Import static SQL data (normally used for ext_tables_static+adt.sql)

Parameters
string$rawDefinitions
Returns
void

Definition at line 501 of file InstallUtility.php.

References GeneralUtility\makeInstance().

Referenced by InstallUtility\importStaticSqlFile().

importStaticSqlFile (   $extensionSiteRelPath)
protected

Imports a static tables SQL File (ext_tables_static+adt) Execution state is saved in the this->registry, so it only happens once

Parameters
string$extensionSiteRelPath
Returns
void

Definition at line 673 of file InstallUtility.php.

References InstallUtility\emitAfterExtensionStaticSqlImportSignal(), and InstallUtility\importStaticSql().

Referenced by InstallUtility\processDatabaseUpdates().

injectCacheManager ( \TYPO3\CMS\Core\Cache\CacheManager  $cacheManager)
Parameters
\TYPO3\CMS\Core\Cache\CacheManager$cacheManager

Definition at line 152 of file InstallUtility.php.

References InstallUtility\$cacheManager.

injectDatabaseUtility ( \TYPO3\CMS\Extensionmanager\Utility\DatabaseUtility  $databaseUtility)
Parameters
\TYPO3\CMS\Extensionmanager\Utility\DatabaseUtility$databaseUtility

Definition at line 128 of file InstallUtility.php.

References InstallUtility\$databaseUtility.

injectDependencyUtility ( \TYPO3\CMS\Extensionmanager\Utility\DependencyUtility  $dependencyUtility)
Parameters
\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility$dependencyUtility

Definition at line 104 of file InstallUtility.php.

References InstallUtility\$dependencyUtility.

injectExtensionRepository ( \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository  $extensionRepository)
Parameters
\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository$extensionRepository

Definition at line 136 of file InstallUtility.php.

References InstallUtility\$extensionRepository.

injectFileHandlingUtility ( \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility  $fileHandlingUtility)
Parameters
\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility$fileHandlingUtility

Definition at line 112 of file InstallUtility.php.

References InstallUtility\$fileHandlingUtility.

injectInstallToolSqlParser ( \TYPO3\CMS\Install\Service\SqlSchemaMigrationService  $installToolSqlParser)
Parameters
\TYPO3\CMS\Install\Service\SqlSchemaMigrationService$installToolSqlParser

Definition at line 96 of file InstallUtility.php.

References InstallUtility\$installToolSqlParser.

injectListUtility ( \TYPO3\CMS\Extensionmanager\Utility\ListUtility  $listUtility)
Parameters
\TYPO3\CMS\Extensionmanager\Utility\ListUtility$listUtility

Definition at line 120 of file InstallUtility.php.

References InstallUtility\$listUtility.

injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManager  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManager$objectManager

Definition at line 88 of file InstallUtility.php.

References InstallUtility\$objectManager.

injectPackageManager ( \TYPO3\CMS\Core\Package\PackageManager  $packageManager)
Parameters
\TYPO3\CMS\Core\Package\PackageManager$packageManager

Definition at line 144 of file InstallUtility.php.

References InstallUtility\$packageManager.

injectRegistry ( \TYPO3\CMS\Core\Registry  $registry)
Parameters
\TYPO3\CMS\Core\Registry$registry

Definition at line 168 of file InstallUtility.php.

References InstallUtility\$registry.

injectSignalSlotDispatcher ( \TYPO3\CMS\Extbase\SignalSlot\Dispatcher  $signalSlotDispatcher)
Parameters
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher$signalSlotDispatcher

Definition at line 160 of file InstallUtility.php.

References InstallUtility\$signalSlotDispatcher.

install (   $extensionKey)

Helper function to install an extension also processes db updates and clears the cache if the extension asks for it

Parameters
string$extensionKey
Exceptions
ExtensionManagerException
Returns
void

Definition at line 181 of file InstallUtility.php.

References InstallUtility\emitAfterExtensionInstallSignal(), InstallUtility\enrichExtensionWithDetails(), InstallUtility\loadExtension(), InstallUtility\processExtensionSetup(), and InstallUtility\reloadCaches().

isAvailable (   $extensionKey)

Checks if an extension is available in the system

Parameters
string$extensionKey
Returns
bool

Definition at line 302 of file InstallUtility.php.

isLoaded (   $extensionKey)

Wrapper function to check for loaded extensions

Parameters
string$extensionKey
Returns
bool TRUE if extension is loaded

Definition at line 239 of file InstallUtility.php.

isUpdateAvailable ( Extension  $extensionData)

Checks if an update for an extension is available which also resolves dependencies.

Definition at line 572 of file InstallUtility.php.

loadExtension (   $extensionKey)
protected

Wrapper function for loading extensions

Parameters
string$extensionKey
Returns
void

Definition at line 258 of file InstallUtility.php.

Referenced by InstallUtility\install().

processDatabaseUpdates ( array  $extension)

Gets the content of the ext_tables.sql and ext_tables_static+adt.sql files Additionally adds the table definitions for the cache tables

Parameters
array$extension

Definition at line 383 of file InstallUtility.php.

References InstallUtility\importStaticSqlFile(), and InstallUtility\updateDbWithExtTablesSql().

Referenced by InstallUtility\processExtensionSetup().

processRuntimeDatabaseUpdates (   $extensionKey)
protected

Gets all database updates due to runtime configuration, like caching framework or category api for example

Parameters
string$extensionKey

Definition at line 411 of file InstallUtility.php.

References InstallUtility\emitTablesDefinitionIsBeingBuiltSignal(), and InstallUtility\updateDbWithExtTablesSql().

Referenced by InstallUtility\processExtensionSetup().

reloadAvailableExtensions ( )

Reset and reload the available extensions

Definition at line 247 of file InstallUtility.php.

reloadCaches ( )

Reload Cache files and Typo3LoadedExtensions

Returns
void

Definition at line 451 of file InstallUtility.php.

References Bootstrap\getInstance(), and InstallUtility\reloadOpcache().

Referenced by InstallUtility\install().

reloadOpcache ( )
protected

Reloads PHP opcache

Definition at line 461 of file InstallUtility.php.

References GeneralUtility\makeInstance().

Referenced by InstallUtility\reloadCaches(), and InstallUtility\reloadPackageInformation().

reloadPackageInformation (   $extensionKey)

Reloads the package information, if the package is already registered

Parameters
string$extensionKey
Exceptions
TYPO3 if the package isn't available
TYPO3 if an invalid package key was passed
TYPO3 if an invalid package path was passed
TYPO3 if no extension configuration file could be found

Definition at line 316 of file InstallUtility.php.

References InstallUtility\reloadOpcache().

removeExtension (   $extension)

Remove an extension (delete the directory)

Parameters
string$extension
Exceptions
ExtensionManagerException
Returns
void

Definition at line 517 of file InstallUtility.php.

uninstall (   $extensionKey)

Helper function to uninstall an extension

Parameters
string$extensionKey
Exceptions
ExtensionManagerException
Returns
void

Definition at line 216 of file InstallUtility.php.

References InstallUtility\unloadExtension().

unloadExtension (   $extensionKey)
protected

Wrapper function for unloading extensions

Parameters
string$extensionKey
Returns
void

Definition at line 269 of file InstallUtility.php.

References InstallUtility\emitAfterExtensionUninstallSignal().

Referenced by InstallUtility\uninstall().

updateDbWithExtTablesSql (   $rawDefinitions)

Update database / process db updates from ext_tables

Parameters
string$rawDefinitionsThe raw SQL statements from ext_tables.sql
Returns
void

Definition at line 485 of file InstallUtility.php.

References GeneralUtility\makeInstance().

Referenced by InstallUtility\processDatabaseUpdates(), and InstallUtility\processRuntimeDatabaseUpdates().

Member Data Documentation

$cacheManager
protected

Definition at line 73 of file InstallUtility.php.

Referenced by InstallUtility\injectCacheManager().

$databaseUtility
protected

Definition at line 58 of file InstallUtility.php.

Referenced by InstallUtility\injectDatabaseUtility().

$dependencyUtility
protected

Definition at line 43 of file InstallUtility.php.

Referenced by InstallUtility\injectDependencyUtility().

$extensionRepository

Definition at line 63 of file InstallUtility.php.

Referenced by InstallUtility\injectExtensionRepository().

$fileHandlingUtility
protected

Definition at line 48 of file InstallUtility.php.

Referenced by InstallUtility\injectFileHandlingUtility().

$installToolSqlParser

Definition at line 38 of file InstallUtility.php.

Referenced by InstallUtility\injectInstallToolSqlParser().

$listUtility
protected

Definition at line 53 of file InstallUtility.php.

Referenced by InstallUtility\injectListUtility().

$objectManager

Definition at line 33 of file InstallUtility.php.

Referenced by InstallUtility\injectObjectManager().

$packageManager
protected

Definition at line 68 of file InstallUtility.php.

Referenced by InstallUtility\injectPackageManager().

$registry
protected

Definition at line 83 of file InstallUtility.php.

Referenced by InstallUtility\injectRegistry().

$signalSlotDispatcher
protected

Definition at line 78 of file InstallUtility.php.

Referenced by InstallUtility\injectSignalSlotDispatcher().