-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathUserId.php
More file actions
37 lines (33 loc) · 1.03 KB
/
UserId.php
File metadata and controls
37 lines (33 loc) · 1.03 KB
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
<?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;
/**
* UserId criterion matches Content based on matching User ID.
*/
class UserId extends Criterion
{
/**
* @param string|int|string[]|int[] $id
*/
public function __construct($id)
{
parent::__construct(null, null, $id);
}
public function getSpecifications(): array
{
return array(
new Specifications(
Operator::IN,
Specifications::FORMAT_ARRAY,
Specifications::TYPE_INTEGER | Specifications::TYPE_STRING
),
new Specifications(
Operator::EQ,
Specifications::FORMAT_SINGLE,
Specifications::TYPE_INTEGER | Specifications::TYPE_STRING
),
);
}
}