‪TYPO3CMS  ‪main
TYPO3\CMS\Extensionmanager\Utility\InstallUtility Class Reference
Inheritance diagram for TYPO3\CMS\Extensionmanager\Utility\InstallUtility:

Public Member Functions

 __construct (private readonly EventDispatcherInterface $eventDispatcher, private readonly FileHandlingUtility $fileHandlingUtility, private readonly ListUtility $listUtility, private readonly PackageManager $packageManager, private readonly CacheManager $cacheManager, private readonly OpcodeCacheService $opcodeCacheService, private readonly PackageActivationService $packageActivationService, LanguageServiceFactory $languageServiceFactory,)
 
 install (string ... $extensionKeys)
 
 uninstall (string $extensionKey)
 
 reloadAvailableExtensions ()
 
 isAvailable (string $extensionKey)
 
 reloadPackageInformation (string $extensionKey)
 
 enrichExtensionWithDetails (string $extensionKey, bool $loadTerInformation=true)
 
 removeExtension (string $extension)
 

Protected Member Functions

 findInstalledExtensionsThatDependOnExtension (string $extensionKey)
 
 getExtensionArray (string $extensionKey)
 
 isValidExtensionPath (string $path)
 

Private Attributes

LanguageService $languageService
 

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 39 of file InstallUtility.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extensionmanager\Utility\InstallUtility::__construct ( private readonly EventDispatcherInterface  $eventDispatcher,
private readonly FileHandlingUtility  $fileHandlingUtility,
private readonly ListUtility  $listUtility,
private readonly PackageManager  $packageManager,
private readonly CacheManager  $cacheManager,
private readonly OpcodeCacheService  $opcodeCacheService,
private readonly PackageActivationService  $packageActivationService,
LanguageServiceFactory  $languageServiceFactory 
)

Member Function Documentation

◆ enrichExtensionWithDetails()

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

Fetch additional information for an extension key.

Exceptions
ExtensionManagerException

Definition at line 129 of file InstallUtility.php.

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

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

◆ findInstalledExtensionsThatDependOnExtension()

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

Find installed extensions which depend on the given extension. Used by extension uninstall to stop the process if an installed extension depends on the extension to be uninstalled.

Definition at line 170 of file InstallUtility.php.

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

◆ getExtensionArray()

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

◆ install()

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

Wrapper around PackageActivationService to install an extension and processes db updates. The wrapper is used to properly dispatch the AfterPackageActivationEvent passing the current instance to the listeners.

See also
‪DispatchAfterPackageActivationEventOnPackageInitialization

Definition at line 65 of file InstallUtility.php.

◆ isAvailable()

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

Checks if an extension is available in the system.

Definition at line 106 of file InstallUtility.php.

◆ isValidExtensionPath()

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

Is the given path a valid path for extension installation

Parameters
string$path‪Absolute (!) path in question

Definition at line 201 of file InstallUtility.php.

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

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

◆ reloadAvailableExtensions()

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

Reset and reload the available extensions.

Definition at line 98 of file InstallUtility.php.

◆ reloadPackageInformation()

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

Reloads the package information, if the package is already registered.

Exceptions
InvalidPackageStateException‪if the package isn't available

Definition at line 116 of file InstallUtility.php.

◆ removeExtension()

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

◆ uninstall()

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

Helper function to uninstall an extension.

Exceptions
ExtensionManagerException

Definition at line 75 of file InstallUtility.php.

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

Member Data Documentation

◆ $languageService

LanguageService TYPO3\CMS\Extensionmanager\Utility\InstallUtility::$languageService
private

Definition at line 43 of file InstallUtility.php.