PageRecordProvider implements SearchProviderInterface
FinalYes
Search provider to query pages from database
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
- $siteFinder : SiteFinder
- $uriBuilder : UriBuilder
- $userPermissions : string
Methods
- __construct() : mixed
- count() : int
- find() : array<string|int, ResultItem>
- getFilterLabel() : string
- buildConstraintsForTable() : array<string|int, mixed>
- extractSearchableFieldsFromTable() : array<string|int, string>
- Get all fields from given table where we can search for.
- fieldTypeIsSearchable() : bool
- findByTable() : array<string|int, ResultItem>
- getBackendUser() : BackendUserAuthentication
- getPageIdList() : array<string|int, int>
- List of available page uids for user, empty array for admin users.
- getQueryBuilderForTable() : QueryBuilder|null
- getShowLink() : string
- Build a backend edit link based on given record.
- hasPermissionToView() : bool
- parseCommand() : SearchDemand
Properties
$eventDispatcher read-only
protected
EventDispatcherInterface
$eventDispatcher
$iconFactory read-only
protected
IconFactory
$iconFactory
$languageService
protected
LanguageService
$languageService
$languageServiceFactory read-only
protected
LanguageServiceFactory
$languageServiceFactory
$pageIdList
protected
array<string|int, mixed>
$pageIdList
= []
$queryParser read-only
protected
QueryParser
$queryParser
$siteFinder read-only
protected
SiteFinder
$siteFinder
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
$userPermissions
protected
string
$userPermissions
Methods
__construct()
public
__construct(EventDispatcherInterface $eventDispatcher, IconFactory $iconFactory, LanguageServiceFactory $languageServiceFactory, UriBuilder $uriBuilder, QueryParser $queryParser, SiteFinder $siteFinder) : mixed
Parameters
- $eventDispatcher : EventDispatcherInterface
- $iconFactory : IconFactory
- $languageServiceFactory : LanguageServiceFactory
- $uriBuilder : UriBuilder
- $queryParser : QueryParser
- $siteFinder : SiteFinder
count()
public
count(SearchDemand $searchDemand) : int
Parameters
- $searchDemand : SearchDemand
Return values
intfind()
public
find(SearchDemand $searchDemand) : array<string|int, ResultItem>
Parameters
- $searchDemand : SearchDemand
Return values
array<string|int, ResultItem>getFilterLabel()
public
getFilterLabel() : string
Return values
stringbuildConstraintsForTable()
protected
buildConstraintsForTable(string $queryString, QueryBuilder $queryBuilder) : array<string|int, mixed>
Parameters
- $queryString : string
- $queryBuilder : QueryBuilder
Return values
array<string|int, mixed>extractSearchableFieldsFromTable()
Get all fields from given table where we can search for.
protected
extractSearchableFieldsFromTable() : array<string|int, string>
Return values
array<string|int, string>fieldTypeIsSearchable()
protected
fieldTypeIsSearchable(string $fieldType) : bool
Parameters
- $fieldType : string
Return values
boolfindByTable()
protected
findByTable(SearchDemand $searchDemand, int $limit) : array<string|int, ResultItem>
Parameters
- $searchDemand : SearchDemand
- $limit : int
Return values
array<string|int, ResultItem>getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetPageIdList()
List of available page uids for user, empty array for admin users.
protected
getPageIdList() : array<string|int, int>
Return values
array<string|int, int>getQueryBuilderForTable()
protected
getQueryBuilderForTable(SearchDemand $searchDemand) : QueryBuilder|null
Parameters
- $searchDemand : SearchDemand
Return values
QueryBuilder|nullgetShowLink()
Build a backend edit link based on given record.
protected
getShowLink(array<string|int, mixed> $row) : string
Parameters
- $row : array<string|int, mixed>
-
Current record row from database.
Tags
Return values
string —Link to open an edit window for record.
hasPermissionToView()
protected
hasPermissionToView(array<string|int, mixed> $row) : bool
Parameters
- $row : array<string|int, mixed>
Return values
boolparseCommand()
protected
parseCommand(SearchDemand $searchDemand) : SearchDemand
Parameters
- $searchDemand : SearchDemand