-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathUserEnabled.php
More file actions
32 lines (28 loc) · 845 Bytes
/
UserEnabled.php
File metadata and controls
32 lines (28 loc) · 845 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
32
<?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;
/**
* UserEnabled criterion matches Content based on matching User that is enabled or not.
*/
class UserEnabled extends Criterion
{
/**
* @param bool $enabled
*/
public function __construct($enabled)
{
parent::__construct(null, null, $enabled);
}
public function getSpecifications(): array
{
return [
new Specifications(
Operator::EQ,
Specifications::FORMAT_SINGLE,
Specifications::TYPE_BOOLEAN
),
];
}
}