Copied!

CustomFieldInterface

CustomFieldInterface.php : 19

Interface for criteria and sort clauses, which defines a custom field mapping.

Allows to map the field in a certain type to a custom column / field / index in the search backend and retrieve it back from the criterion. The SPI implementation may or may not handle this information for criteria and sort clauses implementing this interface.

Methods

publicgetCustomField()

CustomFieldInterface.php : 40

Return the custom field to query or sort on if set.

public getCustomField(string $type, string $field) : string|null

Parameters

Name Type Default value Description
$type string - -
$field string - -

Return values

string|null

If no custom field is set, return null

publicsetCustomField()

CustomFieldInterface.php : 30

Set a custom field to query or sort on.

public setCustomField(string $type, string $field, string $customField) : void

Set a custom field to query or sort on for a defined field in a defined type.

Parameters

Name Type Default value Description
$type string - -
$field string - -
$customField string - -