Contao Utils Bundle

BuildSearchVectorEvent extends Event
in package

Dispatched before a search vector is tokenized and stored.

Use it to add values that are not stored in a column of the record, for example tags or other relations kept in a separate table, or to remove values that should not be searchable.

Table of Contents

Properties

$locale  : string
$row  : array<string|int, mixed>
$table  : string
$values  : array<string|int, mixed>

Methods

__construct()  : mixed
addValue()  : void
getValues()  : array<int, string>
setValues()  : void

Properties

Methods

__construct()

public __construct(string $table, array<string, mixed> $row, array<int, string> $values, string $locale) : mixed
Parameters
$table : string
$row : array<string, mixed>

The raw database row

$values : array<int, string>

The formatted, not yet tokenized values. Each value stays a separate section of the vector, so a quoted phrase never matches across two values.

$locale : string

The language of the record. The values have been resolved in this language, and the values of the vector are normalized and stemmed in it as well.

setValues()

public setValues(array<int, string> $values) : void
Parameters
$values : array<int, string>

        
On this page

Search results