Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

API/Repository/Values/Content/Query/Criterion/UserMetadata.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\API\Repository\Values\Content\Query\Criterion;
8
9 use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
10 use eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications;
11 use InvalidArgumentException;
12
29 class UserMetadata extends Criterion
30 {
34 const OWNER = 'owner';
35
39 const GROUP = 'group';
40
44 const MODIFIER = 'modifier';
45
55 public function __construct($target, $operator, $value)
56 {
57 switch ($target) {
58 case self::OWNER:
59 case self::GROUP:
60 case self::MODIFIER:
61 parent::__construct($target, $operator, $value);
62
63 return;
64 }
65
66 throw new InvalidArgumentException("Unknown UserMetadata $target");
67 }
68
69 public function getSpecifications()
70 {
71 return [
72 new Specifications(
73 Operator::EQ,
74 Specifications::FORMAT_SINGLE,
75 Specifications::TYPE_INTEGER | Specifications::TYPE_STRING
76 ),
77 new Specifications(
78 Operator::IN,
79 Specifications::FORMAT_ARRAY,
80 Specifications::TYPE_INTEGER | Specifications::TYPE_STRING
81 ),
82 ];
83 }
84 }
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications
This class is used by Criteria to describe which operators they support.
Definition: Specifications.php:15
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\FORMAT_ARRAY
const FORMAT_ARRAY
Definition: Specifications.php:20
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\TYPE_STRING
const TYPE_STRING
Definition: Specifications.php:27
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\TYPE_INTEGER
const TYPE_INTEGER
Criterion input value type description constants.
Definition: Specifications.php:26
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\FORMAT_SINGLE
const FORMAT_SINGLE
Criterion input type description constants.
Definition: Specifications.php:19
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\EQ
const EQ
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:16
eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\IN
const IN
Definition: API/Repository/Values/Content/Query/Criterion/Operator.php:21
eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata
A criterion that matches content based on one of the user metadata (owner, group, modifier).
Definition: API/Repository/Values/Content/Query/Criterion/UserMetadata.php:30
eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata\__construct
__construct($target, $operator, $value)
Creates a new UserMetadata criterion on $metadata.
Definition: API/Repository/Values/Content/Query/Criterion/UserMetadata.php:55
eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata\MODIFIER
const MODIFIER
UserMetadata target: Modifier.
Definition: API/Repository/Values/Content/Query/Criterion/UserMetadata.php:44
eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata\getSpecifications
getSpecifications()
Criterion description function.
Definition: API/Repository/Values/Content/Query/Criterion/UserMetadata.php:69
eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata\GROUP
const GROUP
UserMetadata target: Owner user group.
Definition: API/Repository/Values/Content/Query/Criterion/UserMetadata.php:39
eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata\OWNER
const OWNER
UserMetadata target: Owner user.
Definition: API/Repository/Values/Content/Query/Criterion/UserMetadata.php:34
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion.php:15
eZ\Publish\API\Repository\Values\Content\Query\Criterion\$target
$target
Definition: API/Repository/Values/Content/Query/Criterion.php:35
eZ\Publish\API\Repository\Values\Content\Query\Criterion\$operator
$operator
Definition: API/Repository/Values/Content/Query/Criterion.php:21
eZ\Publish\API\Repository\Values\Content\Query\Criterion\$value
$value
Definition: API/Repository/Values/Content/Query/Criterion.php:28
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion/Ancestor.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.