‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Search\LiveSearch\SearchRepository Class Reference

Public Member Functions

 __construct (protected readonly EventDispatcherInterface $eventDispatcher, protected readonly SearchProviderRegistry $searchProviderRegistry,)
 
SearchProviderInterface[] getViableSearchProviders (SearchDemand $searchDemand)
 
 find (SearchDemand $searchDemand)
 

Public Attributes

array< class-string, function getSearchProviderState(SearchDemand $searchDemand):array { $searchProviders=[];foreach( $this->searchProviderRegistry->getProviders() as $searchProviderClassName=> $searchProvider) { $searchProviders[ $searchProviderClassName]=['instance'=> $searchProvider
 
array< class-string, function getSearchProviderState(SearchDemand $searchDemand):array { $searchProviders=[];foreach( $this->searchProviderRegistry->getProviders() as $searchProviderClassName=> $searchProvider) { $searchProviders[ $searchProviderClassName]=['instance'=> return $searchProviders
 

Detailed Description

Repository class to ease using the search API.

Definition at line 32 of file SearchRepository.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Search\LiveSearch\SearchRepository::__construct ( protected readonly EventDispatcherInterface  $eventDispatcher,
protected readonly SearchProviderRegistry  $searchProviderRegistry 
)

Definition at line 34 of file SearchRepository.php.

Member Function Documentation

◆ find()

◆ getViableSearchProviders()

SearchProviderInterface [] TYPO3\CMS\Backend\Search\LiveSearch\SearchRepository::getViableSearchProviders ( SearchDemand  $searchDemand)

Member Data Documentation

◆ $searchProvider

array<class-string, function getSearchProviderState(SearchDemand $searchDemand): array { $searchProviders = []; foreach ($this->searchProviderRegistry->getProviders() as $searchProviderClassName => $searchProvider) { $searchProviders[$searchProviderClassName] = [ 'instance' => TYPO3\CMS\Backend\Search\LiveSearch\SearchRepository::$searchProvider

Returns a list of available search providers including a flag whether they are currently active.

Parameters
SearchDemand$searchDemand
Returns
‪array<class-string, array{instance: SearchProviderInterface, isActive: bool}>

Definition at line 50 of file SearchRepository.php.

◆ $searchProviders

array<class-string, function getSearchProviderState(SearchDemand $searchDemand): array { $searchProviders = []; foreach ($this->searchProviderRegistry->getProviders() as $searchProviderClassName => $searchProvider) { $searchProviders[$searchProviderClassName] = [ 'instance' => return TYPO3\CMS\Backend\Search\LiveSearch\SearchRepository::$searchProviders
Initial value:
=> in_array($searchProviderClassName, $searchDemand->getSearchProviders(), true),
]

Definition at line 55 of file SearchRepository.php.