ListUtility implements SingletonInterface

Utility for dealing with extension list related functions

Internal

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

Tags
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?

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$availableExtensions  : array<string, array<string, scalar>>|null
$dependencyUtility  : DependencyUtility
$emConfUtility  : EmConfUtility
$eventDispatcher  : EventDispatcherInterface
$extensionRepository  : ExtensionRepository
$packageManager  : PackageManager

Methods

enrichExtensionsWithEmConfAndTerInformation()  : array<string|int, mixed>
Adds the information from the emconf array and TER to the extension information
enrichExtensionsWithEmConfInformation()  : array<string|int, mixed>
Adds the information from the emconf array to the extension information
getAvailableAndInstalledExtensions()  : array<string|int, mixed>
Enrich the output of getAvailableExtensions() with an array key installed = 1 if an extension is loaded.
getAvailableAndInstalledExtensionsWithAdditionalInformation()  : array<string|int, mixed>
Gets all available and installed extension with additional information from em_conf and TER (if available)
getAvailableExtensions()  : array<string|int, array<string|int, mixed>>
Returns the list of available, but not necessarily loaded extensions
getExtension()  : PackageInterface
injectDependencyUtility()  : mixed
injectEmConfUtility()  : mixed
injectEventDispatcher()  : mixed
injectExtensionRepository()  : mixed
injectPackageManager()  : mixed
reloadAvailableExtensions()  : mixed
Reset and reload the available extensions
getExtensionTerData()  : Extension|null
Tries to find given extension with given version in TER data.
getInstallTypeForPackage()  : string
Returns "System", "Global" or "Local" based on extension position in filesystem.
getUpdateableVersion()  : Extension|null
Returns the updateable version for an extension which also resolves dependencies.

Properties

$availableExtensions

protected array<string, array<string, scalar>>|null $availableExtensions

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

Methods

enrichExtensionsWithEmConfAndTerInformation()

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

public enrichExtensionsWithEmConfAndTerInformation(array<string|int, mixed> $extensions) : array<string|int, mixed>
Parameters
$extensions : array<string|int, mixed>
Return values
array<string|int, mixed>

enrichExtensionsWithEmConfInformation()

Adds the information from the emconf array to the extension information

public enrichExtensionsWithEmConfInformation(array<string|int, mixed> $extensions) : array<string|int, mixed>
Parameters
$extensions : array<string|int, mixed>
Return values
array<string|int, mixed>

getAvailableAndInstalledExtensions()

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

public getAvailableAndInstalledExtensions(array<string|int, mixed> $availableExtensions) : array<string|int, mixed>
Parameters
$availableExtensions : array<string|int, mixed>
Return values
array<string|int, mixed>

getAvailableAndInstalledExtensionsWithAdditionalInformation()

Gets all available and installed extension with additional information from em_conf and TER (if available)

public getAvailableAndInstalledExtensionsWithAdditionalInformation([string $filter = '' ]) : array<string|int, mixed>
Parameters
$filter : string = ''
Return values
array<string|int, mixed>

getAvailableExtensions()

Returns the list of available, but not necessarily loaded extensions

public getAvailableExtensions([string $filter = '' ]) : array<string|int, array<string|int, mixed>>
Parameters
$filter : string = ''
Return values
array<string|int, array<string|int, mixed>>

All extensions with info

injectEventDispatcher()

public injectEventDispatcher(EventDispatcherInterface $eventDispatcher) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface

reloadAvailableExtensions()

Reset and reload the available extensions

public reloadAvailableExtensions() : mixed

getExtensionTerData()

Tries to find given extension with given version in TER data.

protected getExtensionTerData(string $extensionKey, string $version) : Extension|null

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

Parameters
$extensionKey : string

Key of the extension

$version : string

String representation of version number

Return values
Extension|null

Extension TER object or NULL if nothing found

getInstallTypeForPackage()

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

protected getInstallTypeForPackage(PackageInterface $package) : string
Parameters
$package : PackageInterface
Return values
string

getUpdateableVersion()

Returns the updateable version for an extension which also resolves dependencies.

protected getUpdateableVersion(Extension $extensionData) : Extension|null
Parameters
$extensionData : Extension
Return values
Extension|null

null if no update available otherwise latest possible update


        
On this page

Search results