DatabaseRecordProvider implements SearchProviderInterface

FinalYes

Search provider to query records from database

Internal

Table of Contents

Interfaces

SearchProviderInterface
Interface to declare a search provider used for the backend search

Properties

$eventDispatcher  : EventDispatcherInterface
$iconFactory  : IconFactory
$languageService  : LanguageService
$languageServiceFactory  : LanguageServiceFactory
$pageIdList  : array<string|int, mixed>
$queryParser  : QueryParser
$searchableSchemaFieldsCollector  : SearchableSchemaFieldsCollector
$uriBuilder  : UriBuilder
$userPermissions  : string

Methods

__construct()  : mixed
count()  : int
find()  : array<string|int, ResultItem>
getFilterLabel()  : string
buildConstraintsForTable()  : array<string|int, CompositeExpression>
canAccessTable()  : bool
countByTable()  : int
extractSearchableFieldsFromTable()  : array<string|int, string>
Get all fields from given table where we can search for.
fieldTypeIsSearchable()  : bool
findByTable()  : array<string|int, ResultItem>
getAccessibleTables()  : array<string|int, mixed>
getBackendUser()  : BackendUserAuthentication
getEditLink()  : string
Build a backend edit link based on given record.
getPageIdList()  : array<string|int, int>
List of available page uids for user, empty array for admin users.
getQueryBuilderForTable()  : QueryBuilder|null
getShowLink()  : string
Build a link to the record list based on given record.
parseCommand()  : array<string|int, mixed>

Properties

$eventDispatcher read-only

protected EventDispatcherInterface $eventDispatcher

$pageIdList

protected array<string|int, mixed> $pageIdList = []

$userPermissions

protected string $userPermissions

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher, IconFactory $iconFactory, LanguageServiceFactory $languageServiceFactory, UriBuilder $uriBuilder, QueryParser $queryParser, SearchableSchemaFieldsCollector $searchableSchemaFieldsCollector) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface
$iconFactory : IconFactory
$languageServiceFactory : LanguageServiceFactory
$uriBuilder : UriBuilder
$queryParser : QueryParser
$searchableSchemaFieldsCollector : SearchableSchemaFieldsCollector

getFilterLabel()

public getFilterLabel() : string
Return values
string

canAccessTable()

protected canAccessTable(string $tableName) : bool
Parameters
$tableName : string
Return values
bool

countByTable()

protected countByTable(SearchDemand $searchDemand, string $tableName) : int
Parameters
$searchDemand : SearchDemand
$tableName : string
Return values
int

extractSearchableFieldsFromTable()

Get all fields from given table where we can search for.

protected extractSearchableFieldsFromTable(string $tableName) : array<string|int, string>
Parameters
$tableName : string
Return values
array<string|int, string>

fieldTypeIsSearchable()

protected fieldTypeIsSearchable(string $fieldType) : bool
Parameters
$fieldType : string
Return values
bool

findByTable()

protected findByTable(SearchDemand $searchDemand, string $tableName, int $limit, int $offset) : array<string|int, ResultItem>
Parameters
$searchDemand : SearchDemand
$tableName : string
$limit : int
$offset : int
Return values
array<string|int, ResultItem>

Build a backend edit link based on given record.

protected getEditLink(string $tableName, array<string|int, mixed> $row) : string
Parameters
$tableName : string

Record table name

$row : array<string|int, mixed>

Current record row from database.

Tags
see
BackendUtility::readPageAccess()
Return values
string

Link to open an edit window for record.

getPageIdList()

List of available page uids for user, empty array for admin users.

protected getPageIdList() : array<string|int, int>
Return values
array<string|int, int>

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

protected getShowLink(array<string|int, mixed> $row) : string
Parameters
$row : array<string|int, mixed>

Current record row from database.

Return values
string

Link to open an edit window for record.

parseCommand()

protected parseCommand(SearchDemand $searchDemand) : array<string|int, mixed>
Parameters
$searchDemand : SearchDemand
Return values
array<string|int, mixed>

        
On this page

Search results