-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSubdocumentQuery.php
More file actions
31 lines (27 loc) · 955 Bytes
/
SubdocumentQuery.php
File metadata and controls
31 lines (27 loc) · 955 Bytes
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
<?php
namespace Netgen\EzPlatformSearchExtra\API\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications;
/**
* SubdocumentQuery criterion is used to query Content subdocuments of a specific type.
*/
class SubdocumentQuery extends Criterion
{
/**
* @param string $documentTypeIdentifier
* @param \eZ\Publish\API\Repository\Values\Content\Query\Criterion $filter
*
* @throws \InvalidArgumentException
*/
public function __construct($documentTypeIdentifier, Criterion $filter)
{
parent::__construct($documentTypeIdentifier, null, $filter);
}
public function getSpecifications(): array
{
return [
new Specifications(Operator::EQ, Specifications::FORMAT_SINGLE),
];
}
}