Copied!

SearchServiceDecorator

SearchServiceDecorator.php : 18
Implements SearchService

Properties

protected $innerService

SearchServiceDecorator.php : 21
protected SearchService $innerService

Methods

public__construct()

SearchServiceDecorator.php : 23
public __construct(SearchService $innerService)

Parameters

Name Type Default value Description
$innerService SearchService - -

publicfindContent()

SearchServiceDecorator.php : 28

Finds content objects for the given query.

public findContent(Query $query[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : SearchResult

Parameters

Name Type Default value Description
$query Query - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Also used to define which field languages are loaded for the returned content. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations

$filterOnUserPermissions bool true

if true only the objects which the user is allowed to read are returned.

Return values

SearchResult

publicfindContentInfo()

SearchServiceDecorator.php : 36

Finds contentInfo objects for the given query.

public findContentInfo(Query $query[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : SearchResult

This method works just like findContent, however does not load the full Content Objects. This means it can be more efficient for use cases where you don't need the full Content. Also including use cases where content will be loaded by separate code, like an ESI based sub requests that takes content ID as input.

Parameters

Name Type Default value Description
$query Query - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations

$filterOnUserPermissions bool true

if true (default) only the objects which is the user allowed to read are returned.

Return values

SearchResult

publicfindLocations()

SearchServiceDecorator.php : 61

Finds Locations for the given query.

public findLocations(LocationQuery $query[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : SearchResult

Parameters

Name Type Default value Description
$query LocationQuery - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations

$filterOnUserPermissions bool true

if true only the objects which is the user allowed to read are returned.

Return values

SearchResult

publicfindSingle()

SearchServiceDecorator.php : 44

Performs a query for a single content object.

public findSingle(Criterion $filter[, array<string|int, mixed> $languageFilter = [] ][, bool $filterOnUserPermissions = true ]) : Content

Parameters

Name Type Default value Description
$filter Criterion - -
$languageFilter array<string|int, mixed> []

Configuration for specifying prioritized languages query will be performed on. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations

$filterOnUserPermissions bool true

if true only the objects which is the user allowed to read are returned.

Return values

Content

publicsuggest()

SearchServiceDecorator.php : 52

Suggests a list of values for the given prefix.

public suggest(string $prefix[, array<string|int, mixed> $fieldPaths = [] ][, int $limit = 10 ][, Criterion $filter = null ]) : mixed

Parameters

Name Type Default value Description
$prefix string - -
$fieldPaths array<string|int, mixed> [] -
$limit int 10 -
$filter Criterion null -

publicsupports()

SearchServiceDecorator.php : 69

Query for supported capability of currently configured search engine.

public supports(int $capabilityFlag) : bool

Will return false if search engine does not implement Capable.

Parameters

Name Type Default value Description
$capabilityFlag int -

One of CAPABILITY_* constants.

Return values

bool