1 | <?php |
||
26 | class Field extends FieldBase |
||
27 | { |
||
28 | /** |
||
29 | * Field converter registry. |
||
30 | * |
||
31 | * @var \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry |
||
32 | */ |
||
33 | protected $fieldConverterRegistry; |
||
34 | |||
35 | /** |
||
36 | * Field value converter. |
||
37 | * |
||
38 | * @var \eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Converter |
||
39 | */ |
||
40 | protected $fieldValueConverter; |
||
41 | |||
42 | /** |
||
43 | * Transformation processor. |
||
44 | * |
||
45 | * @var \eZ\Publish\Core\Persistence\TransformationProcessor |
||
46 | */ |
||
47 | protected $transformationProcessor; |
||
48 | |||
49 | /** |
||
50 | * Construct from handler handler. |
||
51 | * |
||
52 | * @param \eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler |
||
53 | * @param \eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler |
||
54 | * @param \eZ\Publish\SPI\Persistence\Content\Language\Handler $languageHandler |
||
55 | * @param \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry $fieldConverterRegistry |
||
56 | * @param \eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Converter $fieldValueConverter |
||
57 | * @param \eZ\Publish\Core\Persistence\TransformationProcessor $transformationProcessor |
||
58 | */ |
||
59 | public function __construct( |
||
73 | |||
74 | /** |
||
75 | * Check if this criterion handler accepts to handle the given criterion. |
||
76 | * |
||
77 | * @param \eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion |
||
78 | * |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function accept(Criterion $criterion) |
||
85 | |||
86 | /** |
||
87 | * Returns relevant field information for the specified field. |
||
88 | * |
||
89 | * The returned information is returned as an array of the attribute |
||
90 | * identifier and the sort column, which should be used. |
||
91 | * |
||
92 | * @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException If no searchable fields are found for the given $fieldIdentifier. |
||
93 | * @throws \RuntimeException if no converter is found |
||
94 | * |
||
95 | * @param string $fieldIdentifier |
||
96 | * |
||
97 | * @return array |
||
98 | * |
||
99 | * @throws \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound |
||
100 | */ |
||
101 | protected function getFieldsInformation($fieldIdentifier) |
||
128 | |||
129 | /** |
||
130 | * Generate query expression for a Criterion this handler accepts. |
||
131 | * |
||
132 | * accept() must be called before calling this method. |
||
133 | * |
||
134 | * @throws \eZ\Publish\API\Repository\Exceptions\NotImplementedException If no searchable fields are found for the given criterion target. |
||
135 | * |
||
136 | * @param \eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter $converter |
||
137 | * @param \eZ\Publish\Core\Persistence\Database\SelectQuery $query |
||
138 | * @param \eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion |
||
139 | * @param array $languageSettings |
||
140 | * |
||
141 | * @return \eZ\Publish\Core\Persistence\Database\Expression |
||
142 | * |
||
143 | * @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException |
||
144 | * @throws \eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound |
||
145 | */ |
||
146 | public function handle( |
||
210 | } |
||
211 |