‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider:
TYPO3\CMS\Backend\Search\LiveSearch\SearchProviderInterface

Public Member Functions

 __construct (protected readonly EventDispatcherInterface $eventDispatcher, protected readonly IconFactory $iconFactory, protected readonly LanguageServiceFactory $languageServiceFactory, protected readonly UriBuilder $uriBuilder, protected readonly QueryParser $queryParser,)
 
 getFilterLabel ()
 
 count (SearchDemand $searchDemand)
 
ResultItem[] find (SearchDemand $searchDemand)
 

Protected Member Functions

 parseCommand (SearchDemand $searchDemand)
 
 getQueryBuilderForTable (SearchDemand $searchDemand, string $tableName)
 
 countByTable (SearchDemand $searchDemand, string $tableName)
 
ResultItem[] findByTable (SearchDemand $searchDemand, string $tableName, int $limit, int $offset)
 
 canAccessTable (string $tableName)
 
 getAccessibleTables (BeforeSearchInDatabaseRecordProviderEvent $event)
 
int[] getPageIdList ()
 
string[] extractSearchableFieldsFromTable (string $tableName)
 
CompositeExpression[] buildConstraintsForTable (string $queryString, QueryBuilder $queryBuilder, string $tableName)
 
 fieldTypeIsSearchable (string $fieldType)
 
string getShowLink (array $row)
 
string getEditLink (string $tableName, array $row)
 
 getBackendUser ()
 

Protected Attributes

LanguageService $languageService
 
string $userPermissions
 
array $pageIdList = []
 

Private Attributes

const RECURSIVE_PAGE_LEVEL = 99
 

Detailed Description

Search provider to query records from database

Definition at line 52 of file DatabaseRecordProvider.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::__construct ( protected readonly EventDispatcherInterface  $eventDispatcher,
protected readonly IconFactory  $iconFactory,
protected readonly LanguageServiceFactory  $languageServiceFactory,
protected readonly UriBuilder  $uriBuilder,
protected readonly QueryParser  $queryParser 
)

Member Function Documentation

◆ buildConstraintsForTable()

◆ canAccessTable()

TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::canAccessTable ( string  $tableName)
protected

◆ count()

◆ countByTable()

TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::countByTable ( SearchDemand  $searchDemand,
string  $tableName 
)
protected

◆ extractSearchableFieldsFromTable()

string [] TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::extractSearchableFieldsFromTable ( string  $tableName)
protected

◆ fieldTypeIsSearchable()

TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::fieldTypeIsSearchable ( string  $fieldType)
protected

◆ find()

◆ findByTable()

ResultItem [] TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::findByTable ( SearchDemand  $searchDemand,
string  $tableName,
int  $limit,
int  $offset 
)
protected

◆ getAccessibleTables()

◆ getBackendUser()

◆ getEditLink()

string TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::getEditLink ( string  $tableName,
array  $row 
)
protected

Build a backend edit link based on given record.

Parameters
string$tableName‪Record table name
array$row‪Current record row from database.
Returns
‪string Link to open an edit window for record.
See also
‪\TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess()

Definition at line 492 of file DatabaseRecordProvider.php.

References $GLOBALS, and TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider\getBackendUser().

Referenced by TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider\findByTable().

◆ getFilterLabel()

TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::getFilterLabel ( )

◆ getPageIdList()

int [] TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::getPageIdList ( )
protected

◆ getQueryBuilderForTable()

◆ getShowLink()

string TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::getShowLink ( array  $row)
protected

Build a link to the record list based on given record.

Parameters
array$row‪Current record row from database.
Returns
‪string Link to open an edit window for record.

Definition at line 466 of file DatabaseRecordProvider.php.

References $GLOBALS, and TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider\getBackendUser().

Referenced by TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider\findByTable().

◆ parseCommand()

Member Data Documentation

◆ $languageService

LanguageService TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::$languageService
protected

Definition at line 56 of file DatabaseRecordProvider.php.

◆ $pageIdList

array TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::$pageIdList = []
protected

Definition at line 58 of file DatabaseRecordProvider.php.

◆ $userPermissions

string TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::$userPermissions
protected

Definition at line 57 of file DatabaseRecordProvider.php.

◆ RECURSIVE_PAGE_LEVEL

const TYPO3\CMS\Backend\Search\LiveSearch\DatabaseRecordProvider::RECURSIVE_PAGE_LEVEL = 99
private

Definition at line 54 of file DatabaseRecordProvider.php.