‪TYPO3CMS  11.5
TYPO3\CMS\Extensionmanager\Utility\InstallUtility Class Reference
Inheritance diagram for TYPO3\CMS\Extensionmanager\Utility\InstallUtility:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 injectFileHandlingUtility (FileHandlingUtility $fileHandlingUtility)
 
 injectListUtility (ListUtility $listUtility)
 
 injectPackageManager (PackageManager $packageManager)
 
 injectCacheManager (CacheManager $cacheManager)
 
 injectRegistry (Registry $registry)
 
 injectBootService (BootService $bootService)
 
 install (... $extensionKeys)
 
 processExtensionSetup (string $extensionKey)
 
 uninstall ($extensionKey)
 
 reloadAvailableExtensions ()
 
bool isAvailable ($extensionKey)
 
 reloadPackageInformation ($extensionKey)
 
array enrichExtensionWithDetails ($extensionKey, $loadTerInformation=true)
 
 reloadCaches ()
 
 updateDatabase ()
 
 importStaticSql ($rawDefinitions)
 
 removeExtension ($extension)
 

Protected Member Functions

array findInstalledExtensionsThatDependOnExtension (string $extensionKey)
 
 loadExtension ($extensionKey)
 
 unloadExtension ($extensionKey)
 
array getExtensionArray ($extensionKey)
 
 reloadOpcache ()
 
 saveDefaultConfiguration ($extensionKey)
 
Import null importT3DFile ($extensionKey, $packagePath)
 
 importStaticSqlFile (string $extensionKey, $packagePath)
 
 importInitialFiles ($packagePath, $extensionKey)
 
 importSiteConfiguration (string $extensionKey, string $packagePath, ?Import $import=null)
 
bool isValidExtensionPath ($path)
 

Protected Attributes

TYPO3 CMS Extensionmanager Utility FileHandlingUtility $fileHandlingUtility
 
TYPO3 CMS Extensionmanager Utility ListUtility $listUtility
 
TYPO3 CMS Core Package PackageManager $packageManager
 
TYPO3 CMS Core Cache CacheManager $cacheManager
 
TYPO3 CMS Core Registry $registry
 
EventDispatcherInterface $eventDispatcher
 
BootService $bootService
 

Detailed Description

Extension Manager Install Utility

This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.

Definition at line 55 of file InstallUtility.php.

Member Function Documentation

◆ enrichExtensionWithDetails()

array TYPO3\CMS\Extensionmanager\Utility\InstallUtility::enrichExtensionWithDetails (   $extensionKey,
  $loadTerInformation = true 
)

Fetch additional information for an extension key

Parameters
string$extensionKey
bool$loadTerInformation
Returns
‪array
Exceptions
ExtensionManagerException

Definition at line 304 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\getExtensionArray().

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\install(), and TYPO3\CMS\Extensionmanager\Utility\InstallUtility\removeExtension().

◆ findInstalledExtensionsThatDependOnExtension()

array TYPO3\CMS\Extensionmanager\Utility\InstallUtility::findInstalledExtensionsThatDependOnExtension ( string  $extensionKey)
protected

Find installed extensions which depend on the given extension. This is used at extension uninstall to stop the process if an installed extension depends on the extension to be uninstalled.

Parameters
string$extensionKey
Returns
‪array

Definition at line 223 of file InstallUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\uninstall().

◆ getExtensionArray()

array TYPO3\CMS\Extensionmanager\Utility\InstallUtility::getExtensionArray (   $extensionKey)
protected
Parameters
string$extensionKey
Returns
‪array
Exceptions
ExtensionManagerException

Definition at line 328 of file InstallUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\enrichExtensionWithDetails().

◆ importInitialFiles()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::importInitialFiles (   $packagePath,
  $extensionKey 
)
protected

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

Parameters
string$packagePath‪absolute path to extension dir
string$extensionKey

Definition at line 511 of file InstallUtility.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\mkdir(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\processExtensionSetup().

◆ importSiteConfiguration()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::importSiteConfiguration ( string  $extensionKey,
string  $packagePath,
?Import  $import = null 
)
protected
Parameters
string$extensionKey
string$packagePath
Import | null$import

Definition at line 535 of file InstallUtility.php.

References $finder, TYPO3\CMS\Core\Core\Environment\getConfigPath(), and TYPO3\CMS\Core\Utility\GeneralUtility\mkdir().

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\processExtensionSetup().

◆ importStaticSql()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::importStaticSql (   $rawDefinitions)

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

Parameters
string$rawDefinitions

Definition at line 404 of file InstallUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\importStaticSqlFile().

◆ importStaticSqlFile()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::importStaticSqlFile ( string  $extensionKey,
  $packagePath 
)
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$extensionKey
string$packagePath

Definition at line 488 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\importStaticSql(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\processExtensionSetup().

◆ importT3DFile()

Import null TYPO3\CMS\Extensionmanager\Utility\InstallUtility::importT3DFile (   $extensionKey,
  $packagePath 
)
protected

Uses the export import extension to import a T3D or XML file to PID 0 Execution state is saved in the this->registry, so it only happens once

Parameters
string$extensionKey
string$packagePath
Returns
‪Import|null

Definition at line 443 of file InstallUtility.php.

References TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\processExtensionSetup().

◆ injectBootService()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::injectBootService ( BootService  $bootService)
Parameters
BootService$bootService

Definition at line 135 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\$bootService.

◆ injectCacheManager()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::injectCacheManager ( CacheManager  $cacheManager)
Parameters
\TYPO3\CMS\Core\Cache\CacheManager$cacheManager

Definition at line 119 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\$cacheManager.

◆ injectEventDispatcher()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::injectEventDispatcher ( EventDispatcherInterface  $eventDispatcher)

◆ injectFileHandlingUtility()

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

Definition at line 95 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\$fileHandlingUtility.

◆ injectListUtility()

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

Definition at line 103 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\$listUtility.

◆ injectPackageManager()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::injectPackageManager ( PackageManager  $packageManager)
Parameters
\TYPO3\CMS\Core\Package\PackageManager$packageManager

Definition at line 111 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\$packageManager.

◆ injectRegistry()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::injectRegistry ( Registry  $registry)
Parameters
\TYPO3\CMS\Core\Registry$registry

Definition at line 127 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\$registry.

◆ install()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::install (   $extensionKeys)

◆ isAvailable()

bool TYPO3\CMS\Extensionmanager\Utility\InstallUtility::isAvailable (   $extensionKey)

Checks if an extension is available in the system

Parameters
string$extensionKey
Returns
‪bool

Definition at line 273 of file InstallUtility.php.

◆ isValidExtensionPath()

bool TYPO3\CMS\Extensionmanager\Utility\InstallUtility::isValidExtensionPath (   $path)
protected

Is the given path a valid path for extension installation

Parameters
string$path‪the absolute (!) path in question
Returns
‪bool

Definition at line 612 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Domain\Model\Extension\returnAllowedInstallPaths().

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\removeExtension().

◆ loadExtension()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::loadExtension (   $extensionKey)
protected

Wrapper function for loading extensions

Parameters
string$extensionKey

Definition at line 250 of file InstallUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\install().

◆ processExtensionSetup()

◆ reloadAvailableExtensions()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::reloadAvailableExtensions ( )

Reset and reload the available extensions

Definition at line 240 of file InstallUtility.php.

◆ reloadCaches()

◆ reloadOpcache()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::reloadOpcache ( )
protected

◆ reloadPackageInformation()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::reloadPackageInformation (   $extensionKey)

Reloads the package information, if the package is already registered

Parameters
string$extensionKey
Exceptions

Definition at line 287 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\reloadOpcache().

◆ removeExtension()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::removeExtension (   $extension)

Remove an extension (delete the directory)

Parameters
string$extension
Exceptions
ExtensionManagerException

Definition at line 419 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\enrichExtensionWithDetails(), and TYPO3\CMS\Extensionmanager\Utility\InstallUtility\isValidExtensionPath().

◆ saveDefaultConfiguration()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::saveDefaultConfiguration (   $extensionKey)
protected

Save default configuration of an extension

Parameters
string$extensionKey

Definition at line 393 of file InstallUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\install().

◆ uninstall()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::uninstall (   $extensionKey)

Helper function to uninstall an extension

Parameters
string$extensionKey
Exceptions
ExtensionManagerException

Definition at line 199 of file InstallUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\InstallUtility\findInstalledExtensionsThatDependOnExtension(), TYPO3\CMS\Extbase\Utility\LocalizationUtility\translate(), and TYPO3\CMS\Extensionmanager\Utility\InstallUtility\unloadExtension().

◆ unloadExtension()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::unloadExtension (   $extensionKey)
protected

Wrapper function for unloading extensions

Parameters
string$extensionKey

Definition at line 260 of file InstallUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\uninstall().

◆ updateDatabase()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::updateDatabase ( )

Executes all safe database statements. Tables and fields are created and altered. Nothing gets deleted or renamed here.

Definition at line 361 of file InstallUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\InstallUtility\install().

Member Data Documentation

◆ $bootService

BootService TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$bootService
protected

◆ $cacheManager

TYPO3 CMS Core Cache CacheManager TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$cacheManager
protected

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$eventDispatcher
protected

◆ $fileHandlingUtility

TYPO3 CMS Extensionmanager Utility FileHandlingUtility TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$fileHandlingUtility
protected

◆ $listUtility

TYPO3 CMS Extensionmanager Utility ListUtility TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$listUtility
protected

◆ $packageManager

TYPO3 CMS Core Package PackageManager TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$packageManager
protected

◆ $registry

TYPO3 CMS Core Registry TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$registry
protected