/
CustomFieldInterface.php
42 lines (39 loc) · 1.28 KB
/
CustomFieldInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* File containing the custom field interface
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Publish\API\Repository\Values\Content\Query;
/**
* 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.
*/
interface CustomFieldInterface
{
/**
* Set a custom field to query or sort on
*
* Set a custom field to query or sort on for a defined field in a defined type.
*
* @param string $type
* @param string $field
* @param string $customField
* @return void
*/
public function setCustomField( $type, $field, $customField );
/**
* Return the custom field to query or sort on if set
*
* @param string $type
* @param string $field
* @return mixed If no custom field is set, return null
*/
public function getCustomField( $type, $field );
}