‪TYPO3CMS  10.4
TYPO3\CMS\Extensionmanager\Utility\ListUtility Class Reference
Inheritance diagram for TYPO3\CMS\Extensionmanager\Utility\ListUtility:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 injectEmConfUtility (EmConfUtility $emConfUtility)
 
 injectExtensionRepository (ExtensionRepository $extensionRepository)
 
 injectInstallUtility (InstallUtility $installUtility)
 
 injectPackageManager (PackageManager $packageManager)
 
array[] getAvailableExtensions (string $filter='')
 
 reloadAvailableExtensions ()
 
TYPO3 CMS Core Package PackageInterface getExtension ($extensionKey)
 
array getAvailableAndInstalledExtensions (array $availableExtensions)
 
array enrichExtensionsWithEmConfInformation (array $extensions)
 
array enrichExtensionsWithEmConfAndTerInformation (array $extensions)
 
array getAvailableAndInstalledExtensionsWithAdditionalInformation (string $filter='')
 

Protected Member Functions

string getInstallTypeForPackage (PackageInterface $package)
 
Extension null getExtensionTerData ($extensionKey, $version)
 

Protected Attributes

EmConfUtility $emConfUtility
 
ExtensionRepository $extensionRepository
 
InstallUtility $installUtility
 
PackageManager $packageManager
 
array $availableExtensions
 
EventDispatcherInterface $eventDispatcher
 

Detailed Description

Utility for dealing with extension list related functions

@TODO: Refactor this API class:

  • ‪The methods depend on each other, they take each others result, that could be done internally
  • ‪There is no good wording to distinguish existing and loaded extensions
  • ‪The name 'listUtility' is not good, the methods could be moved to some 'extensionInformationUtility', or a repository?

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

Definition at line 40 of file ListUtility.php.

Member Function Documentation

◆ enrichExtensionsWithEmConfAndTerInformation()

array TYPO3\CMS\Extensionmanager\Utility\ListUtility::enrichExtensionsWithEmConfAndTerInformation ( array  $extensions)

Adds the information from the emconf array and TER to the extension information

Parameters
array$extensions
Returns
‪array

Definition at line 207 of file ListUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\ListUtility\enrichExtensionsWithEmConfInformation(), and TYPO3\CMS\Extensionmanager\Utility\ListUtility\getExtensionTerData().

Referenced by TYPO3\CMS\Extensionmanager\Utility\ListUtility\getAvailableAndInstalledExtensionsWithAdditionalInformation().

◆ enrichExtensionsWithEmConfInformation()

array TYPO3\CMS\Extensionmanager\Utility\ListUtility::enrichExtensionsWithEmConfInformation ( array  $extensions)

Adds the information from the emconf array to the extension information

Parameters
array$extensions
Returns
‪array

Definition at line 188 of file ListUtility.php.

Referenced by TYPO3\CMS\Extensionmanager\Utility\ListUtility\enrichExtensionsWithEmConfAndTerInformation().

◆ getAvailableAndInstalledExtensions()

array TYPO3\CMS\Extensionmanager\Utility\ListUtility::getAvailableAndInstalledExtensions ( array  $availableExtensions)

Enrich the output of getAvailableExtensions() with an array key installed = 1 if an extension is loaded.

Parameters
array$availableExtensions
Returns
‪array

Definition at line 172 of file ListUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\ListUtility\$availableExtensions.

Referenced by TYPO3\CMS\Extensionmanager\Utility\ListUtility\getAvailableAndInstalledExtensionsWithAdditionalInformation().

◆ getAvailableAndInstalledExtensionsWithAdditionalInformation()

array TYPO3\CMS\Extensionmanager\Utility\ListUtility::getAvailableAndInstalledExtensionsWithAdditionalInformation ( string  $filter = '')

◆ getAvailableExtensions()

◆ getExtension()

TYPO3 CMS Core Package PackageInterface TYPO3\CMS\Extensionmanager\Utility\ListUtility::getExtension (   $extensionKey)
Parameters
string$extensionKey
Returns
‪\TYPO3\CMS\Core\Package\PackageInterface
Exceptions

Definition at line 145 of file ListUtility.php.

◆ getExtensionTerData()

Extension null TYPO3\CMS\Extensionmanager\Utility\ListUtility::getExtensionTerData (   $extensionKey,
  $version 
)
protected

Tries to find given extension with given version in TER data. If extension is found but not the given version, we return TER data from highest version with version data set to given one.

Parameters
string$extensionKey‪Key of the extension
string$version‪String representation of version number
Returns
‪Extension|null Extension TER object or NULL if nothing found

Definition at line 235 of file ListUtility.php.

References TYPO3\CMS\Core\Utility\VersionNumberUtility\convertVersionNumberToInteger(), and TYPO3\CMS\Extensionmanager\Domain\Model\Extension\setVersion().

Referenced by TYPO3\CMS\Extensionmanager\Utility\ListUtility\enrichExtensionsWithEmConfAndTerInformation().

◆ getInstallTypeForPackage()

string TYPO3\CMS\Extensionmanager\Utility\ListUtility::getInstallTypeForPackage ( PackageInterface  $package)
protected

Returns "System", "Global" or "Local" based on extension position in filesystem.

Parameters
PackageInterface$package
Returns
‪string

Definition at line 156 of file ListUtility.php.

References TYPO3\CMS\Core\Package\PackageInterface\getPackagePath(), and TYPO3\CMS\Extensionmanager\Domain\Model\Extension\returnInstallPaths().

Referenced by TYPO3\CMS\Extensionmanager\Utility\ListUtility\getAvailableExtensions().

◆ injectEmConfUtility()

TYPO3\CMS\Extensionmanager\Utility\ListUtility::injectEmConfUtility ( EmConfUtility  $emConfUtility)
Parameters
EmConfUtility$emConfUtility

Definition at line 74 of file ListUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\ListUtility\$emConfUtility.

◆ injectEventDispatcher()

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

◆ injectExtensionRepository()

TYPO3\CMS\Extensionmanager\Utility\ListUtility::injectExtensionRepository ( ExtensionRepository  $extensionRepository)
Parameters
ExtensionRepository$extensionRepository

Definition at line 82 of file ListUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\ListUtility\$extensionRepository.

◆ injectInstallUtility()

TYPO3\CMS\Extensionmanager\Utility\ListUtility::injectInstallUtility ( InstallUtility  $installUtility)
Parameters
InstallUtility$installUtility

Definition at line 90 of file ListUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\ListUtility\$installUtility.

◆ injectPackageManager()

TYPO3\CMS\Extensionmanager\Utility\ListUtility::injectPackageManager ( PackageManager  $packageManager)
Parameters
PackageManager$packageManager

Definition at line 98 of file ListUtility.php.

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

◆ reloadAvailableExtensions()

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

Reset and reload the available extensions

Definition at line 133 of file ListUtility.php.

References TYPO3\CMS\Extensionmanager\Utility\ListUtility\getAvailableExtensions().

Member Data Documentation

◆ $availableExtensions

◆ $emConfUtility

EmConfUtility TYPO3\CMS\Extensionmanager\Utility\ListUtility::$emConfUtility
protected

◆ $eventDispatcher

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

◆ $extensionRepository

ExtensionRepository TYPO3\CMS\Extensionmanager\Utility\ListUtility::$extensionRepository
protected

◆ $installUtility

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

◆ $packageManager

PackageManager TYPO3\CMS\Extensionmanager\Utility\ListUtility::$packageManager
protected