‪TYPO3CMS  ‪main
TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository Class Reference
Inheritance diagram for TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository:
TYPO3\CMS\Extbase\Persistence\Repository TYPO3\CMS\Extbase\Persistence\Repository TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Core\SingletonInterface TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Extbase\Persistence\RepositoryInterface TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 injectQuerySettings (QuerySettingsInterface $querySettings)
 
 initializeObject ()
 
int countAll ()
 
array QueryResultInterface findAll ()
 
QueryResultInterface findByExtensionKeyOrderedByVersion ($extensionKey)
 
object null findOneByCurrentVersionByExtensionKey ($extensionKey)
 
object null findOneByExtensionKeyAndVersion ($extensionKey, $version)
 
mixed findByTitleOrAuthorNameOrExtensionKey ($searchString)
 
QueryResultInterface findByVersionRangeAndExtensionKeyOrderedByVersion ($extensionKey, $lowestVersion=0, $highestVersion=0, $includeCurrentVersion=true)
 
Extension[] findAllCommunityDistributions (bool $showUnsuitableDistributions=false)
 
Extension[] findAllOfficialDistributions (bool $showUnsuitableDistributions=false)
 
int countByVersionRangeAndExtensionKey ($extensionKey, $lowestVersion=0, $highestVersion=0)
 
object null findHighestAvailableVersion ($extensionKey)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
 __construct ()
 
 add ($object)
 
 remove ($object)
 
 update ($modifiedObject)
 
 removeAll ()
 
object null findByUid ($uid)
 
object null findByIdentifier ($identifier)
 
 setDefaultOrderings (array $defaultOrderings)
 
 setDefaultQuerySettings (QuerySettingsInterface $defaultQuerySettings)
 
QueryInterface createQuery ()
 
mixed __call ($methodName, $arguments)
 
QueryResultInterface findBy (array $criteria, array $orderBy=null, int $limit=null, int $offset=null)
 
 findOneBy (array $criteria, array $orderBy=null)
 
 count (array $criteria)
 

Public Attributes

const TABLE_NAME = 'tx_extensionmanager_domain_model_extension'
 

Protected Member Functions

 addDefaultConstraints (QueryInterface $query)
 
Extension[] getExtensionsSuitableForTypo3Version (array $extensions)
 
Extension[] filterYoungestVersionOfExtensionList (array $extensions, bool $showUnsuitable)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
class string< RepositoryInterfacegetRepositoryClassName ()
 

Protected Attributes

QuerySettingsInterface $querySettings = null
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Persistence\Repository
PersistenceManagerInterface $persistenceManager
 
string $objectType
 
array< non-empty-string, $defaultOrderings=array();protected QuerySettingsInterface $defaultQuerySettings;public function injectPersistenceManager(PersistenceManagerInterface $persistenceManager) { $this-> persistenceManager = $persistenceManager
 

Detailed Description

A repository for extensions

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

Definition at line 36 of file ExtensionRepository.php.

Member Function Documentation

◆ addDefaultConstraints()

TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::addDefaultConstraints ( QueryInterface  $query)
protected

◆ countAll()

int TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::countAll ( )

◆ countByVersionRangeAndExtensionKey()

int TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::countByVersionRangeAndExtensionKey (   $extensionKey,
  $lowestVersion = 0,
  $highestVersion = 0 
)

Count extensions with a certain key between a given version range

Parameters
string$extensionKey
int$lowestVersion
int$highestVersion
Returns
‪int

Definition at line 304 of file ExtensionRepository.php.

References TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository\findByVersionRangeAndExtensionKeyOrderedByVersion().

◆ filterYoungestVersionOfExtensionList()

Extension [] TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::filterYoungestVersionOfExtensionList ( array  $extensions,
bool  $showUnsuitable 
)
protected

Get a list of various extensions in various versions and returns a filtered list containing the extension-version combination with the highest version number.

Parameters
Extension[]$extensions
Returns
‪Extension[]

Definition at line 374 of file ExtensionRepository.php.

References TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository\getExtensionsSuitableForTypo3Version().

Referenced by TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository\findAllCommunityDistributions(), and TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository\findAllOfficialDistributions().

◆ findAll()

array QueryResultInterface TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findAll ( )

◆ findAllCommunityDistributions()

Extension [] TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findAllCommunityDistributions ( bool  $showUnsuitableDistributions = false)

◆ findAllOfficialDistributions()

Extension [] TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findAllOfficialDistributions ( bool  $showUnsuitableDistributions = false)

◆ findByExtensionKeyOrderedByVersion()

QueryResultInterface TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findByExtensionKeyOrderedByVersion (   $extensionKey)

Find an extension by extension key ordered by version

Parameters
string$extensionKey
Returns
‪QueryResultInterface

Definition at line 93 of file ExtensionRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery(), and TYPO3\CMS\Extbase\Persistence\QueryInterface\ORDER_DESCENDING.

◆ findByTitleOrAuthorNameOrExtensionKey()

mixed TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findByTitleOrAuthorNameOrExtensionKey (   $searchString)

Find an extension by title, author name or extension key This is the function used by the TER search. It is using a scoring for the matches to sort the extension with an exact key match on top

Parameters
string$searchString‪The string to search for extensions
Returns
‪mixed

Definition at line 154 of file ExtensionRepository.php.

References TYPO3\CMS\Core\Database\Connection\PARAM_INT, and TYPO3\CMS\Core\Database\Connection\PARAM_INT_ARRAY.

◆ findByVersionRangeAndExtensionKeyOrderedByVersion()

QueryResultInterface TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findByVersionRangeAndExtensionKeyOrderedByVersion (   $extensionKey,
  $lowestVersion = 0,
  $highestVersion = 0,
  $includeCurrentVersion = true 
)

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

Parameters
string$extensionKey
int$lowestVersion
int$highestVersion
bool$includeCurrentVersion
Returns
‪QueryResultInterface

Definition at line 218 of file ExtensionRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery(), and TYPO3\CMS\Extbase\Persistence\QueryInterface\ORDER_DESCENDING.

Referenced by TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository\countByVersionRangeAndExtensionKey().

◆ findHighestAvailableVersion()

object null TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findHighestAvailableVersion (   $extensionKey)

Find highest version available of an extension

Parameters
string$extensionKey
Returns
‪object|null

Definition at line 315 of file ExtensionRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery(), and TYPO3\CMS\Extbase\Persistence\QueryInterface\ORDER_DESCENDING.

◆ findOneByCurrentVersionByExtensionKey()

object null TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findOneByCurrentVersionByExtensionKey (   $extensionKey)

Find the current version by extension key

Parameters
string$extensionKey
Returns
‪object|null

Definition at line 112 of file ExtensionRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery().

◆ findOneByExtensionKeyAndVersion()

object null TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::findOneByExtensionKeyAndVersion (   $extensionKey,
  $version 
)

Find one extension by extension key and version

Parameters
string$extensionKey
string$version‪(example: 4.3.10)
Returns
‪object|null

Definition at line 133 of file ExtensionRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\createQuery().

◆ getExtensionsSuitableForTypo3Version()

Extension [] TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::getExtensionsSuitableForTypo3Version ( array  $extensions)
protected

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

Parameters
Extension[]$extensions‪List of extensions to check
Returns
‪Extension[] List of extensions suitable for current TYPO3 version

Definition at line 354 of file ExtensionRepository.php.

References TYPO3\CMS\Core\Utility\VersionNumberUtility\getNumericTypo3Version().

Referenced by TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository\filterYoungestVersionOfExtensionList().

◆ initializeObject()

TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::initializeObject ( )

Do not include pid in queries

Definition at line 53 of file ExtensionRepository.php.

References TYPO3\CMS\Extbase\Persistence\Repository\setDefaultQuerySettings().

◆ injectQuerySettings()

TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::injectQuerySettings ( QuerySettingsInterface  $querySettings)

Member Data Documentation

◆ $querySettings

QuerySettingsInterface TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::$querySettings = null
protected

◆ TABLE_NAME

const TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository::TABLE_NAME = 'tx_extensionmanager_domain_model_extension'

Definition at line 41 of file ExtensionRepository.php.