ExtensionRepository

Read onlyYes

A repository for extensions.

The implementation does not filter extension marked as insecure, this has to happen on a different level when needed.

Internal

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

Table of Contents

Methods

__construct()  : mixed
countAll()  : int
findAll()  : array<string|int, Extension>
findAllCommunityDistributions()  : array<string|int, Extension>
Find all extensions with category "distribution" not published by the TYPO3 CMS Team.
findAllOfficialDistributions()  : array<string|int, Extension>
Find all extensions with category "distribution" that have been published by the TYPO3 CMS Team.
findByExtensionKeyOrderedByVersion()  : array<string|int, Extension>
findByTitleOrAuthorNameOrExtensionKey()  : array<string|int, Extension>
Find extensions by title, author name or extension key.
findByUid()  : Extension|null
findByVersionRangeAndExtensionKeyOrderedByVersion()  : array<string|int, Extension>
Find an extension between a certain version range ordered by version number.
findHighestAvailableVersion()  : Extension|null
Find the highest version available of an extension.
findOneByCurrentVersionByExtensionKey()  : Extension|null
findOneByExtensionKeyAndVersion()  : Extension|null
Find a single extension by key and version when the remote is not known.
findOneByPackageIdentifier()  : Extension|null
Resolve a single package by its full remote identity (package key + version + remote).
filterYoungestVersionOfExtensionList()  : array<string|int, Extension>
Filter a list of various extensions in various versions to return a list containing the extension-version combination with the highest version number.
getExtensionsSuitableForTypo3Version()  : array<string|int, Extension>
Get extensions (out of a given list) that are suitable for the current TYPO3 version

Methods

countAll()

public countAll() : int
Return values
int

findAllCommunityDistributions()

Find all extensions with category "distribution" not published by the TYPO3 CMS Team.

public findAllCommunityDistributions([bool $showUnsuitableDistributions = false ]) : array<string|int, Extension>
Parameters
$showUnsuitableDistributions : bool = false
Return values
array<string|int, Extension>

findAllOfficialDistributions()

Find all extensions with category "distribution" that have been published by the TYPO3 CMS Team.

public findAllOfficialDistributions([bool $showUnsuitableDistributions = false ]) : array<string|int, Extension>
Parameters
$showUnsuitableDistributions : bool = false
Return values
array<string|int, Extension>

findByExtensionKeyOrderedByVersion()

public findByExtensionKeyOrderedByVersion(string $extensionKey) : array<string|int, Extension>
Parameters
$extensionKey : string
Return values
array<string|int, Extension>

findByTitleOrAuthorNameOrExtensionKey()

Find extensions by title, author name or extension key.

public findByTitleOrAuthorNameOrExtensionKey(string $searchString) : array<string|int, Extension>

Uses a simple scoring to sort matches.

Parameters
$searchString : string

The string to search for extensions

Return values
array<string|int, Extension>

findByVersionRangeAndExtensionKeyOrderedByVersion()

Find an extension between a certain version range ordered by version number.

public findByVersionRangeAndExtensionKeyOrderedByVersion(string $extensionKey[, int $lowestVersion = 0 ][, int $highestVersion = 0 ][, bool $includeCurrentVersion = true ]) : array<string|int, Extension>
Parameters
$extensionKey : string
$lowestVersion : int = 0
$highestVersion : int = 0
$includeCurrentVersion : bool = true
Return values
array<string|int, Extension>

findHighestAvailableVersion()

Find the highest version available of an extension.

public findHighestAvailableVersion(string $extensionKey) : Extension|null
Parameters
$extensionKey : string
Return values
Extension|null

findOneByCurrentVersionByExtensionKey()

public findOneByCurrentVersionByExtensionKey(string $extensionKey) : Extension|null
Parameters
$extensionKey : string
Return values
Extension|null

findOneByExtensionKeyAndVersion()

Find a single extension by key and version when the remote is not known.

public findOneByExtensionKeyAndVersion(string $extensionKey, string $version) : Extension|null

Callers that do know the remote should use findOneByPackageIdentifier instead.

Note: if the same key/version exists for more than one remote the returned record is arbitrary. This is intentional for the two use-cases that require it: looking up TER data for a locally installed extension (no remote stored on disk) and the update flow, where the frontend currently only submits key and version.

Parameters
$extensionKey : string
$version : string

(example: 4.3.10)

Return values
Extension|null

findOneByPackageIdentifier()

Resolve a single package by its full remote identity (package key + version + remote).

public findOneByPackageIdentifier(PackageIdentifier $packageIdentifier) : Extension|null

All three fields are applied as constraints. Use findOneByExtensionKeyAndVersion when the remote is not known.

Parameters
$packageIdentifier : PackageIdentifier
Return values
Extension|null

filterYoungestVersionOfExtensionList()

Filter a list of various extensions in various versions to return a list containing the extension-version combination with the highest version number.

protected filterYoungestVersionOfExtensionList(array<string|int, Extension$extensions, bool $showUnsuitable) : array<string|int, Extension>
Parameters
$extensions : array<string|int, Extension>
$showUnsuitable : bool
Return values
array<string|int, Extension>

getExtensionsSuitableForTypo3Version()

Get extensions (out of a given list) that are suitable for the current TYPO3 version

protected getExtensionsSuitableForTypo3Version(array<string|int, Extension$extensions) : array<string|int, Extension>
Parameters
$extensions : array<string|int, Extension>

List of extensions to check

Return values
array<string|int, Extension>

List of extensions suitable for current TYPO3 version

On this page

Search results