TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ListUtility Class Reference
Inheritance diagram for ListUtility:
SingletonInterface

Public Member Functions

 injectEmConfUtility (\TYPO3\CMS\Extensionmanager\Utility\EmConfUtility $emConfUtility)
 
 injectExtensionRepository (\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository)
 
 injectInstallUtility (\TYPO3\CMS\Extensionmanager\Utility\InstallUtility $installUtility)
 
 injectPackageManager (\TYPO3\CMS\Core\Package\PackageManager $packageManager)
 
 injectSignalSlotDispatcher (\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher)
 
 getAvailableExtensions ()
 
 reloadAvailableExtensions ()
 
 getExtension ($extensionKey)
 
 getAvailableAndInstalledExtensions (array $availableExtensions)
 
 enrichExtensionsWithEmConfInformation (array $extensions)
 
 enrichExtensionsWithEmConfAndTerInformation (array $extensions)
 
 enrichExtensionsWithIconInformation (array $extensions)
 
 getAvailableAndInstalledExtensionsWithAdditionalInformation ()
 

Protected Member Functions

 emitPackagesMayHaveChangedSignal ()
 
 getInstallTypeForPackage (PackageInterface $package)
 
 getExtensionTerData ($extensionKey, $version)
 

Protected Attributes

 $emConfUtility
 
 $extensionRepository
 
 $installUtility
 
 $packageManager
 
 $signalSlotDispatcher
 
 $availableExtensions = null
 

Detailed Description

Utility for dealing with extension list related functions

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

Definition at line 31 of file extensionmanager/Classes/Utility/ListUtility.php.

Member Function Documentation

emitPackagesMayHaveChangedSignal ( )
protected

Emits packages may have changed signal

Definition at line 150 of file extensionmanager/Classes/Utility/ListUtility.php.

Referenced by ListUtility\getAvailableExtensions().

enrichExtensionsWithEmConfAndTerInformation ( array  $extensions)

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

Parameters
array$extensions
Returns
array

Definition at line 212 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\enrichExtensionsWithEmConfInformation(), and ListUtility\getExtensionTerData().

Referenced by ListUtility\getAvailableAndInstalledExtensionsWithAdditionalInformation().

enrichExtensionsWithEmConfInformation ( array  $extensions)

Adds the information from the emconf array to the extension information

Parameters
array$extensions
Returns
array

Definition at line 193 of file extensionmanager/Classes/Utility/ListUtility.php.

Referenced by ListUtility\enrichExtensionsWithEmConfAndTerInformation().

enrichExtensionsWithIconInformation ( array  $extensions)

Adds information about icon size to the extension information

Parameters
array$extensions
Returns
array

Definition at line 268 of file extensionmanager/Classes/Utility/ListUtility.php.

Referenced by ListUtility\getAvailableAndInstalledExtensionsWithAdditionalInformation().

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 177 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\$availableExtensions.

Referenced by ListUtility\getAvailableAndInstalledExtensionsWithAdditionalInformation().

getAvailableAndInstalledExtensionsWithAdditionalInformation ( )
getExtension (   $extensionKey)
Parameters
string$extensionKey
Returns
Exceptions
TYPO3 if the specified package is unknown

Definition at line 142 of file extensionmanager/Classes/Utility/ListUtility.php.

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$extensionKeyKey of the extension
string$versionString representation of version number
Returns
Extension|NULL Extension TER object or NULL if nothing found

Definition at line 240 of file extensionmanager/Classes/Utility/ListUtility.php.

References VersionNumberUtility\convertVersionNumberToInteger().

Referenced by ListUtility\enrichExtensionsWithEmConfAndTerInformation().

getInstallTypeForPackage ( PackageInterface  $package)
protected

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

Parameters
PackageInterface$package
Returns
string

Definition at line 161 of file extensionmanager/Classes/Utility/ListUtility.php.

References PackageInterface\getPackagePath(), GeneralUtility\isFirstPartOfStr(), and Extension\returnInstallPaths().

Referenced by ListUtility\getAvailableExtensions().

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

Definition at line 66 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\$emConfUtility.

injectExtensionRepository ( \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository  $extensionRepository)
Parameters
\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository$extensionRepository

Definition at line 74 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\$extensionRepository.

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

Definition at line 82 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\$installUtility.

injectPackageManager ( \TYPO3\CMS\Core\Package\PackageManager  $packageManager)
Parameters
\TYPO3\CMS\Core\Package\PackageManager$packageManager

Definition at line 90 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\$packageManager.

injectSignalSlotDispatcher ( \TYPO3\CMS\Extbase\SignalSlot\Dispatcher  $signalSlotDispatcher)
Parameters
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher$signalSlotDispatcher

Definition at line 98 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\$signalSlotDispatcher.

reloadAvailableExtensions ( )

Reset and reload the available extensions

Definition at line 130 of file extensionmanager/Classes/Utility/ListUtility.php.

References ListUtility\getAvailableExtensions().

Member Data Documentation

$emConfUtility
protected
$extensionRepository
protected
$installUtility
protected
$packageManager
protected
$signalSlotDispatcher
protected