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

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

A criterion that matches content based on its visibility. More...

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

## Public Member Functions
| __construct ($value)
| Creates a new Visibility 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)

## Public Attributes
const | VISIBLE = 0
| Visibility constant: visible. More...
const | HIDDEN = 1
| Visibility constant: hidden. More...
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 its visibility.

Warning: This Criterion acts on all locations of a Content, so it will include hidden content within the tree you are searching for if content has visible location elsewhere. This is intentional and you should rather use LocationSearch if this is not the behaviour you want.

Definition at line 20 of file API/Repository/Values/Content/Query/Criterion/Visibility.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Creates a new Visibility criterion.

Parameters

  int | $value | Visibility: self::VISIBLE, self::HIDDEN

Exceptions

Definition at line 39 of file API/Repository/Values/Content/Query/Criterion/Visibility.php.

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

## Member Function Documentation

## ◆ createFromQueryBuilder()

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

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

## ◆ getSpecifications()

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

References eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\EQ, eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\FORMAT_SINGLE, and eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications\TYPE_INTEGER.

## Member Data Documentation

## ◆ HIDDEN

const eZ\Publish\API\Repository\Values\Content\Query\Criterion\Visibility::HIDDEN = 1

Visibility constant: hidden.

Definition at line 30 of file API/Repository/Values/Content/Query/Criterion/Visibility.php.

## ◆ VISIBLE

const eZ\Publish\API\Repository\Values\Content\Query\Criterion\Visibility::VISIBLE = 0

Visibility constant: visible.

Definition at line 25 of file API/Repository/Values/Content/Query/Criterion/Visibility.php.

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

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

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