‪TYPO3CMS  11.5
TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService Class Reference
Inheritance diagram for TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct (RemoteRegistry $remoteRegistry, FileHandlingUtility $fileHandlingUtility)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 injectDownloadQueue (DownloadQueue $downloadQueue)
 
 injectDependencyUtility (DependencyUtility $dependencyUtility)
 
 injectInstallUtility (InstallUtility $installUtility)
 
 markExtensionForInstallation ($extensionKey)
 
 markExtensionForDownload (Extension $extension)
 
 markExtensionForUpdate (Extension $extension)
 
 setSkipDependencyCheck ($skipDependencyCheck)
 
 setAutomaticInstallationEnabled ($automaticInstallationEnabled)
 
bool array installExtension (Extension $extension)
 
array getDependencyErrors ()
 
Extension getExtension ($extensionKey)
 
bool isAvailable ($extensionKey)
 
 reloadPackageInformation ($extensionKey)
 
array getAndResolveDependencies (Extension $extension)
 
 downloadMainExtension (Extension $extension)
 
 setDownloadPath (string $downloadPath)
 

Protected Member Functions

bool checkDependencies (Extension $extension)
 
array uninstallDependenciesToBeUpdated (array $updateQueue)
 
array installDependencies (array $installQueue)
 
array downloadDependencies (array $downloadQueue)
 
 rawDownload (Extension $extension)
 

Protected Attributes

DownloadQueue $downloadQueue
 
DependencyUtility $dependencyUtility
 
InstallUtility $installUtility
 
bool $automaticInstallationEnabled = true
 
bool $skipDependencyCheck = false
 
EventDispatcherInterface $eventDispatcher
 
FileHandlingUtility $fileHandlingUtility
 
RemoteRegistry $remoteRegistry
 
string $downloadPath = 'Local'
 

Detailed Description

Service class for managing multiple step processes (dependencies for example)

Definition at line 35 of file ExtensionManagementService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::__construct ( RemoteRegistry  $remoteRegistry,
FileHandlingUtility  $fileHandlingUtility 
)

Member Function Documentation

◆ checkDependencies()

bool TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::checkDependencies ( Extension  $extension)
protected

Check dependencies for an extension and its required extensions

Parameters
Extension$extension
Returns
‪bool Returns TRUE if all dependencies can be resolved, otherwise FALSE

Definition at line 272 of file ExtensionManagementService.php.

Referenced by TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\installExtension().

◆ downloadDependencies()

array TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::downloadDependencies ( array  $downloadQueue)
protected

◆ downloadMainExtension()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::downloadMainExtension ( Extension  $extension)

Downloads the extension the user wants to install This is separated from downloading the dependencies as an extension is able to provide it's own dependencies

Parameters
Extension$extension

Definition at line 363 of file ExtensionManagementService.php.

References TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject\getUid(), and TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\rawDownload().

Referenced by TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\installExtension().

◆ getAndResolveDependencies()

array TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::getAndResolveDependencies ( Extension  $extension)

Get and resolve dependencies

Parameters
Extension$extension
Returns
‪array

Definition at line 345 of file ExtensionManagementService.php.

◆ getDependencyErrors()

array TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::getDependencyErrors ( )

Returns the unresolved dependency errors

Returns
‪array

Definition at line 226 of file ExtensionManagementService.php.

◆ getExtension()

Extension TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::getExtension (   $extensionKey)

◆ injectDependencyUtility()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::injectDependencyUtility ( DependencyUtility  $dependencyUtility)
Parameters
DependencyUtility$dependencyUtility

Definition at line 95 of file ExtensionManagementService.php.

References TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\$dependencyUtility.

◆ injectDownloadQueue()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::injectDownloadQueue ( DownloadQueue  $downloadQueue)
Parameters
DownloadQueue$downloadQueue

Definition at line 87 of file ExtensionManagementService.php.

References TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\$downloadQueue.

◆ injectEventDispatcher()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::injectEventDispatcher ( EventDispatcherInterface  $eventDispatcher)

◆ injectInstallUtility()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::injectInstallUtility ( InstallUtility  $installUtility)
Parameters
InstallUtility$installUtility

Definition at line 103 of file ExtensionManagementService.php.

References TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\$installUtility.

◆ installDependencies()

array TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::installDependencies ( array  $installQueue)
protected

Install dependent extensions

Parameters
array$installQueue
Returns
‪array

Definition at line 303 of file ExtensionManagementService.php.

Referenced by TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\installExtension().

◆ installExtension()

bool array TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::installExtension ( Extension  $extension)

◆ isAvailable()

bool TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::isAvailable (   $extensionKey)

Checks if an extension is available in the system

Parameters
string$extensionKey
Returns
‪bool

Definition at line 249 of file ExtensionManagementService.php.

◆ markExtensionForDownload()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::markExtensionForDownload ( Extension  $extension)

Mark an extension for download

Parameters
Extension$extension

Definition at line 126 of file ExtensionManagementService.php.

◆ markExtensionForInstallation()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::markExtensionForInstallation (   $extensionKey)

◆ markExtensionForUpdate()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::markExtensionForUpdate ( Extension  $extension)
Parameters
Extension$extension

Definition at line 139 of file ExtensionManagementService.php.

◆ rawDownload()

◆ reloadPackageInformation()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::reloadPackageInformation (   $extensionKey)
Parameters
string$extensionKey
Exceptions

Definition at line 261 of file ExtensionManagementService.php.

◆ setAutomaticInstallationEnabled()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::setAutomaticInstallationEnabled (   $automaticInstallationEnabled)
Parameters
bool$automaticInstallationEnabled

Definition at line 160 of file ExtensionManagementService.php.

References TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\$automaticInstallationEnabled.

◆ setDownloadPath()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::setDownloadPath ( string  $downloadPath)

Set the download path

Parameters
string$downloadPath
Exceptions
ExtensionManagerException

Definition at line 402 of file ExtensionManagementService.php.

References TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\$downloadPath, and TYPO3\CMS\Extensionmanager\Domain\Model\Extension\returnAllowedInstallTypes().

◆ setSkipDependencyCheck()

TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::setSkipDependencyCheck (   $skipDependencyCheck)

Enables or disables the dependency check for system environment (PHP, TYPO3) before extension installation

Parameters
bool$skipDependencyCheck

Definition at line 152 of file ExtensionManagementService.php.

References TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\$skipDependencyCheck.

◆ uninstallDependenciesToBeUpdated()

array TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::uninstallDependenciesToBeUpdated ( array  $updateQueue)
protected

Uninstall extensions that will be updated This is not strictly necessary but cleaner all in all

Parameters
Extension[]$updateQueue
Returns
‪array

Definition at line 287 of file ExtensionManagementService.php.

Referenced by TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService\installExtension().

Member Data Documentation

◆ $automaticInstallationEnabled

bool TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$automaticInstallationEnabled = true
protected

◆ $dependencyUtility

DependencyUtility TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$dependencyUtility
protected

◆ $downloadPath

string TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$downloadPath = 'Local'
protected

◆ $downloadQueue

DownloadQueue TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$downloadQueue
protected

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$eventDispatcher
protected

◆ $fileHandlingUtility

FileHandlingUtility TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$fileHandlingUtility
protected

◆ $installUtility

InstallUtility TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$installUtility
protected

◆ $remoteRegistry

RemoteRegistry TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$remoteRegistry
protected

◆ $skipDependencyCheck

bool TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::$skipDependencyCheck = false
protected