Class

eZ\Publish\Core\Search\Elasticsearch\Content\SortClauseVisitor\Field\Field

class Field extends FieldBase

Visits the Field sort clause.

Methods

__construct(FieldNameResolver $fieldNameResolver)

from FieldBase
bool canVisit(SortClause $sortClause)

Check if visitor is applicable to current sortClause.

mixed visit(SortClause $sortClause)

Map field value to a proper Elasticsearch representation.

Details

in FieldBase at line 30
public __construct(FieldNameResolver $fieldNameResolver)

Parameters

FieldNameResolver $fieldNameResolver

at line 27
public bool canVisit(SortClause $sortClause)

Check if visitor is applicable to current sortClause.

Parameters

SortClause $sortClause

Return Value

bool

at line 41
public mixed visit(SortClause $sortClause)

Map field value to a proper Elasticsearch representation.

Parameters

SortClause $sortClause

Return Value

mixed

Exceptions

InvalidArgumentException If no sortable fields are found for the given sort clause target.