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

Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
eZ\Publish\Core\Limitation\ParentContentTypeLimitationType Class Reference

ParentContentTypeLimitation is a Content limitation. More...

Inheritance diagram for eZ\Publish\Core\Limitation\ParentContentTypeLimitationType:

## Public Member Functions
| acceptValue (APILimitationValue $limitationValue)
| Accepts a Limitation value and checks for structural validity. More...
| validate (APILimitationValue $limitationValue)
| Makes sure LimitationValue->limitationValues is valid according to valueSchema(). More...
| buildValue (array $limitationValues)
| Create the Limitation Value. More...
| evaluate (APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets=null)
| Evaluate permission against content & target(placement/parent/assignment). More...
| getCriterion (APILimitationValue $value, APIUserReference $currentUser)
| Returns Criterion for use in find() query. More...
| valueSchema ()
| Returns info on valid $limitationValues. More...
Public Member Functions inherited from eZ\Publish\Core\Limitation\AbstractPersistenceLimitationType
| __construct (SPIPersistenceHandler $persistence)
Public Member Functions inherited from eZ\Publish\SPI\Limitation\Type
| evaluate (APILimitationValue $value, APIUserReference $currentUser, APIValueObject $object, array $targets=null)
| Evaluate ("Vote") against a main value object and targets for the context. More...

## Protected Member Functions
| evaluateForContentCreateStruct (APILimitationValue $value, array $targets=null)
| Evaluate permissions for ContentCreateStruct against LocationCreateStruct placements. More...

## Private Member Functions
| loadParentLocations (ContentInfo $contentInfo)

## Additional Inherited Members
Public Attributes inherited from eZ\Publish\SPI\Limitation\Type
const | ACCESS_GRANTED = true
| Constants for return value of {. More...
const | ACCESS_ABSTAIN = null
const | ACCESS_DENIED = false
const | VALUE_SCHEMA_LOCATION_ID = 1
| Constants for valueSchema() return values. More...
const | VALUE_SCHEMA_LOCATION_PATH = 2
Protected Attributes inherited from eZ\Publish\Core\Limitation\AbstractPersistenceLimitationType
| $persistence

## Detailed Description

ParentContentTypeLimitation is a Content limitation.

Definition at line 29 of file ParentContentTypeLimitationType.php.

## Member Function Documentation

## ◆ acceptValue()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::acceptValue | ( | APILimitationValue | $limitationValue | ) |

Accepts a Limitation value and checks for structural validity.

Makes sure LimitationValue object and ->limitationValues is of correct type.

Exceptions

Implements eZ\Publish\SPI\Limitation\Type.

Definition at line 40 of file ParentContentTypeLimitationType.php.

## ◆ buildValue()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::buildValue | ( | array | $limitationValues | ) |

Create the Limitation Value.

Parameters

  mixed[] | $limitationValues |

Returns
  \eZ\Publish\API\Repository\Values\User\Limitation

Implements eZ\Publish\SPI\Limitation\Type.

Definition at line 92 of file ParentContentTypeLimitationType.php.

## ◆ evaluate()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::evaluate | ( | APILimitationValue | $value,
|  | APIUserReference | $currentUser,
|  | ValueObject | $object,
|  | array | $targets = `null`
| ) |  |

Evaluate permission against content & target(placement/parent/assignment).

Exceptions

Definition at line 112 of file ParentContentTypeLimitationType.php.

References eZ\Publish\Core\Limitation\ParentContentTypeLimitationType\evaluateForContentCreateStruct(), and eZ\Publish\Core\Limitation\ParentContentTypeLimitationType\loadParentLocations().

## ◆ evaluateForContentCreateStruct()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::evaluateForContentCreateStruct | ( | APILimitationValue | $value,
|  | array | $targets = `null`
| ) |  |
| protected

Evaluate permissions for ContentCreateStruct against LocationCreateStruct placements.

Exceptions

Definition at line 184 of file ParentContentTypeLimitationType.php.

Referenced by eZ\Publish\Core\Limitation\ParentContentTypeLimitationType\evaluate().

## ◆ getCriterion()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::getCriterion | ( | APILimitationValue | $value,
|  | APIUserReference | $currentUser
| ) |  |

Returns Criterion for use in find() query.

Parameters

  \eZ\Publish\API\Repository\Values\User\Limitation | $value |
  \eZ\Publish\API\Repository\Values\User\UserReference | $currentUser |

Returns
  \eZ\Publish\API\Repository\Values\Content\Query\CriterionInterface

Implements eZ\Publish\SPI\Limitation\Type.

Definition at line 223 of file ParentContentTypeLimitationType.php.

## ◆ loadParentLocations()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::loadParentLocations | ( | ContentInfo | $contentInfo | ) |
| private

Parameters

  \eZ\Publish\API\Repository\Values\Content\ContentInfo | $contentInfo |

Returns
  \eZ\Publish\SPI\Persistence\Content\Location[]

Exceptions

Definition at line 246 of file ParentContentTypeLimitationType.php.

Referenced by eZ\Publish\Core\Limitation\ParentContentTypeLimitationType\evaluate().

## ◆ validate()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::validate | ( | APILimitationValue | $limitationValue | ) |

Makes sure LimitationValue->limitationValues is valid according to valueSchema().

Make sure acceptValue() is checked first!

Parameters

  \eZ\Publish\API\Repository\Values\User\Limitation | $limitationValue |

Returns
  \eZ\Publish\SPI\FieldType\ValidationError[]

Implements eZ\Publish\SPI\Limitation\Type.

Definition at line 64 of file ParentContentTypeLimitationType.php.

## ◆ valueSchema()

eZ\Publish\Core\Limitation\ParentContentTypeLimitationType::valueSchema | ( |  | ) |

Returns info on valid $limitationValues.

Returns
  mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name of that option, in case of int on of VALUE_SCHEMA_ constants.

Implements eZ\Publish\SPI\Limitation\Type.

Definition at line 234 of file ParentContentTypeLimitationType.php.

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

- ParentContentTypeLimitationType.php

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