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\Ancestor Class Reference

A criterion that matches content that is ancestor to the given Location path string. More...

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

## Public Member Functions
| __construct ($value)
| Creates a new Ancestor criterion. More...
| 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 that is ancestor to the given Location path string.

Content will be matched if it is part of at least one of the given subtree path strings.

Definition at line 18 of file API/Repository/Values/Content/Query/Criterion/Ancestor.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\API\Repository\Values\Content\Query\Criterion\Ancestor::__construct | ( |  | $value | ) |

Creates a new Ancestor criterion.

Parameters

  string | string[] | $value | Location path string

Exceptions

Definition at line 28 of file API/Repository/Values/Content/Query/Criterion/Ancestor.php.

References eZ\Publish\API\Repository\Values\Content\Query\Criterion\$value.

## Member Function Documentation

## ◆ createFromQueryBuilder()

static eZ\Publish\API\Repository\Values\Content\Query\Criterion\Ancestor::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 60 of file API/Repository/Values/Content/Query/Criterion/Ancestor.php.

References eZ\Publish\API\Repository\Values\Content\Query\Criterion\$value.

## ◆ getSpecifications()

eZ\Publish\API\Repository\Values\Content\Query\Criterion\Ancestor::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 41 of file API/Repository/Values/Content/Query/Criterion/Ancestor.php.

References eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\EQ, 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, 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/Ancestor.php

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