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

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

SiteAccessLimitation is a User limitation. More...

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

## Public Member Functions
| __construct (array $siteAccessList=[])
| 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\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...

## Private Member Functions
| generateSiteAccessValue ($sa)
| Generates the SiteAccess value as CRC32. More...

## Private Attributes
| $siteAccessList = []

## 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

## Detailed Description

SiteAccessLimitation is a User limitation.

Definition at line 22 of file SiteAccessLimitationType.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Limitation\SiteAccessLimitationType::__construct | ( | array | $siteAccessList = `[]` | ) |

Definition at line 27 of file SiteAccessLimitationType.php.

References eZ\Publish\Core\Limitation\SiteAccessLimitationType\$siteAccessList, and eZ\Publish\Core\Limitation\SiteAccessLimitationType\generateSiteAccessValue().

## Member Function Documentation

## ◆ acceptValue()

eZ\Publish\Core\Limitation\SiteAccessLimitationType::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 55 of file SiteAccessLimitationType.php.

## ◆ buildValue()

eZ\Publish\Core\Limitation\SiteAccessLimitationType::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 106 of file SiteAccessLimitationType.php.

## ◆ evaluate()

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

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

SiteAccess limitation takes a SiteAccess as ValueObject, and is hence like in legacy only suitable for user/login and similar policies.

Exceptions

Definition at line 129 of file SiteAccessLimitationType.php.

References eZ\Publish\Core\Limitation\SiteAccessLimitationType\generateSiteAccessValue().

## ◆ generateSiteAccessValue()

eZ\Publish\Core\Limitation\SiteAccessLimitationType::generateSiteAccessValue | ( |  | $sa | ) |
| private

Generates the SiteAccess value as CRC32.

Parameters

  string | $sa |

Returns
  string

Definition at line 41 of file SiteAccessLimitationType.php.

Referenced by eZ\Publish\Core\Limitation\SiteAccessLimitationType\__construct(), and eZ\Publish\Core\Limitation\SiteAccessLimitationType\evaluate().

## ◆ getCriterion()

eZ\Publish\Core\Limitation\SiteAccessLimitationType::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 160 of file SiteAccessLimitationType.php.

## ◆ validate()

eZ\Publish\Core\Limitation\SiteAccessLimitationType::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 80 of file SiteAccessLimitationType.php.

## ◆ valueSchema()

eZ\Publish\Core\Limitation\SiteAccessLimitationType::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 171 of file SiteAccessLimitationType.php.

## Member Data Documentation

## ◆ $siteAccessList

eZ\Publish\Core\Limitation\SiteAccessLimitationType::$siteAccessList = []
| private

Definition at line 25 of file SiteAccessLimitationType.php.

Referenced by eZ\Publish\Core\Limitation\SiteAccessLimitationType\__construct().

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

- SiteAccessLimitationType.php

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