BeforeSearchInDatabaseRecordProviderEvent

FinalYes

PSR-14 event to modify the incoming input about which tables should be searched for within the live search results. This allows adding additional DB tables to be excluded / ignored, to further limit the search result on certain page IDs or to modify the search query altogether.

Table of Contents

Methods

__construct()  : mixed
getIgnoredTables()  : array<string|int, string>
getSearchDemand()  : SearchDemand
getSearchPageIds()  : array<string|int, mixed>
ignoreTable()  : void
isTableIgnored()  : bool
setIgnoredTables()  : void
setSearchDemand()  : void
setSearchPageIds()  : void

Methods

__construct()

public __construct(array<string|int, mixed> $searchPageIds, SearchDemand $searchDemand) : mixed
Parameters
$searchPageIds : array<string|int, mixed>
$searchDemand : SearchDemand

getIgnoredTables()

public getIgnoredTables() : array<string|int, string>
Return values
array<string|int, string>

getSearchPageIds()

public getSearchPageIds() : array<string|int, mixed>
Return values
array<string|int, mixed>

ignoreTable()

public ignoreTable(string $table) : void
Parameters
$table : string

isTableIgnored()

public isTableIgnored(string $table) : bool
Parameters
$table : string
Return values
bool

setIgnoredTables()

public setIgnoredTables(array<string|int, mixed> $tables) : void
Parameters
$tables : array<string|int, mixed>

setSearchPageIds()

public setSearchPageIds(array<string|int, mixed> $searchPageIds) : void
Parameters
$searchPageIds : array<string|int, mixed>

        
On this page

Search results