Copied!

Handler

Handler.php : 24
Interface

The Search handler retrieves sets of of Content objects, based on a set of criteria.

Methods

publicdeleteContent()

Handler.php : 80

Deletes a content object from the index.

public deleteContent(int $contentId[, int|null $versionId = null ]) : mixed

Parameters

Name Type Default value Description
$contentId int - -
$versionId int|null null -

publicdeleteLocation()

Handler.php : 95

Deletes a location from the index.

public deleteLocation(mixed $locationId, mixed $contentId) : mixed

Parameters

Name Type Default value Description
$locationId mixed - -
$contentId mixed - -

publicfindContent()

Handler.php : 35

Finds content objects for the given query.

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

Parameters

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

Return values

SearchResult

Tags
Throws
InvalidArgumentException

if Query criterion is not applicable to its target

publicfindLocations()

Handler.php : 55

Finds locations for the given $query.

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

Parameters

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

Return values

SearchResult

publicfindSingle()

Handler.php : 46

Performs a query for a single content object.

public findSingle(CriterionInterface $filter[, array<string|int, mixed> $languageFilter = [] ]) : ContentInfo

Parameters

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

Return values

ContentInfo

Tags
Throws
NotFoundException

if the object was not found by the query or due to permissions

Throws
InvalidArgumentException

if Criterion is not applicable to its target

Throws
InvalidArgumentException

if there is more than one result matching the criteria

publicindexContent()

Handler.php : 72

Indexes a content object.

public indexContent(Content $content) : mixed

Parameters

Name Type Default value Description
$content Content - -

publicindexLocation()

Handler.php : 87

Indexes a Location in the index storage.

public indexLocation(Location $location) : mixed

Parameters

Name Type Default value Description
$location Location - -

publicpurgeIndex()

Handler.php : 100

Purges all contents from the index.

public purgeIndex() : mixed

publicsuggest()

Handler.php : 65

Suggests a list of values for the given prefix.

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

Parameters

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