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

Public Member Functions | Static Public Member Functions | List of all members
eZ\Publish\API\Repository\Values\Content\Query\Criterion\FieldRelation Class Reference

A criterion that matches Content based on the relations in relation field. More...

Inheritance diagram for eZ\Publish\API\Repository\Values\Content\Query\Criterion\FieldRelation:

## Public Member Functions
| getSpecifications ()
| Criterion description function. More...
Public Member Functions inherited from eZ\Publish\API\Repository\Values\Content\Query\Criterion
| __construct ($target, $operator, $value, Value $valueData=null)
| Performs operator validation based on the Criterion specifications returned by {. More...

## Static Public Member Functions
static | createFromQueryBuilder ($target, $operator, $value)

## Additional Inherited Members
Public Attributes inherited from eZ\Publish\API\Repository\Values\Content\Query\Criterion
| $operator
| $value
| $target
| $valueData

## Detailed Description

A criterion that matches Content based on the relations in relation field.

This includes Relation and RelationList field types in standard installation, but also any other field type storing \eZ\Publish\API\Repository\Values\Content\Relation::FIELD type relation.

Supported operators:

- IN: will match if Content relates to one or more of the given ids through given relation field
- CONTAINS: will match if Content relates to all of the given ids through given relation field

Definition at line 22 of file API/Repository/Values/Content/Query/Criterion/FieldRelation.php.

## Member Function Documentation

## ◆ createFromQueryBuilder()

static eZ\Publish\API\Repository\Values\Content\Query\Criterion\FieldRelation::createFromQueryBuilder | ( |  | $target,
|  |  | $operator,
|  |  | $value
| ) |  |
| static

Deprecated:
  since 7.2, will be removed in 8.0.

Use the constructor directly instead.

Reimplemented from eZ\Publish\API\Repository\Values\Content\Query\Criterion.

Definition at line 37 of file API/Repository/Values/Content/Query/Criterion/FieldRelation.php.

References eZ\Publish\API\Repository\Values\Content\Query\Criterion\$operator, eZ\Publish\API\Repository\Values\Content\Query\Criterion\$target, and eZ\Publish\API\Repository\Values\Content\Query\Criterion\$value.

## ◆ getSpecifications()

eZ\Publish\API\Repository\Values\Content\Query\Criterion\FieldRelation::getSpecifications | ( |  | ) |

Criterion description function.

Returns the combination of the Criterion's supported operator/value, as an array of eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications objects

- Operator is one supported Operator, as an Operator::* constant
- ValueType is the type of input value this operator requires, either array or single
- SupportedTypes is an array of types the operator will accept
- ValueCountLimitation is an integer saying how many values are expected.

`// IN and EQ are supported return [ // The EQ operator expects a single value, either as an integer or a string new Specifications( Operator::EQ, Specifications::FORMAT_SINGLE, Specifications::TYPE_INTEGER | Specifications::TYPE_STRING ), // The IN operator expects an array of values, of either integers or strings new Specifications( Operator::IN, Specifications::FORMAT_ARRAY, Specifications::TYPE_INTEGER | Specifications::TYPE_STRING ) ]`

Returns
  \eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications[]

Reimplemented from eZ\Publish\API\Repository\Values\Content\Query\Criterion.

Definition at line 24 of file API/Repository/Values/Content/Query/Criterion/FieldRelation.php.

References eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\CONTAINS, eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\FORMAT_ARRAY, eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\FORMAT_SINGLE, eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\IN, eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\TYPE_INTEGER, and eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\TYPE_STRING.

The documentation for this class was generated from the following file:

- API/Repository/Values/Content/Query/Criterion/FieldRelation.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.