PHP Class eZ\Publish\Core\Limitation\ContentTypeLimitationType

Inheritance: extends AbstractPersistenceLimitationType, implements eZ\Publish\SPI\Limitation\Type
Mostrar archivo Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
acceptValue ( eZ\Publish\API\Repository\Values\User\Limitation $limitationValue ) Accepts a Limitation value and checks for structural validity.
buildValue ( array $limitationValues ) : eZ\Publish\API\Repository\Values\User\Limitation Create the Limitation Value.
evaluate ( eZ\Publish\API\Repository\Values\User\Limitation $value, eZ\Publish\API\Repository\Values\User\UserReference $currentUser, eZ\Publish\API\Repository\Values\ValueObject $object, array $targets = null ) : boolean Evaluate permission against content & target(placement/parent/assignment).
getCriterion ( eZ\Publish\API\Repository\Values\User\Limitation $value, eZ\Publish\API\Repository\Values\User\UserReference $currentUser ) : eZ\Publish\API\Repository\Values\Content\Query\CriterionInterface Returns Criterion for use in find() query.
validate ( eZ\Publish\API\Repository\Values\User\Limitation $limitationValue ) : eZ\Publish\SPI\FieldType\ValidationError[] Makes sure LimitationValue->limitationValues is valid according to valueSchema().
valueSchema ( ) : mixed[] | integer Returns info on valid $limitationValues.

Method Details

acceptValue() public method

Makes sure LimitationValue object and ->limitationValues is of correct type.
public acceptValue ( eZ\Publish\API\Repository\Values\User\Limitation $limitationValue )
$limitationValue eZ\Publish\API\Repository\Values\User\Limitation

buildValue() public method

Create the Limitation Value.
public buildValue ( array $limitationValues ) : eZ\Publish\API\Repository\Values\User\Limitation
$limitationValues array
return eZ\Publish\API\Repository\Values\User\Limitation

evaluate() public method

Evaluate permission against content & target(placement/parent/assignment).
public evaluate ( eZ\Publish\API\Repository\Values\User\Limitation $value, eZ\Publish\API\Repository\Values\User\UserReference $currentUser, eZ\Publish\API\Repository\Values\ValueObject $object, array $targets = null ) : boolean
$value eZ\Publish\API\Repository\Values\User\Limitation
$currentUser eZ\Publish\API\Repository\Values\User\UserReference
$object eZ\Publish\API\Repository\Values\ValueObject
$targets array The context of the $object, like Location of Content, if null none where provided by caller
return boolean

getCriterion() public method

Returns Criterion for use in find() query.
public getCriterion ( eZ\Publish\API\Repository\Values\User\Limitation $value, eZ\Publish\API\Repository\Values\User\UserReference $currentUser ) : eZ\Publish\API\Repository\Values\Content\Query\CriterionInterface
$value eZ\Publish\API\Repository\Values\User\Limitation
$currentUser eZ\Publish\API\Repository\Values\User\UserReference
return eZ\Publish\API\Repository\Values\Content\Query\CriterionInterface

validate() public method

Make sure {@link acceptValue()} is checked first!
public validate ( eZ\Publish\API\Repository\Values\User\Limitation $limitationValue ) : eZ\Publish\SPI\FieldType\ValidationError[]
$limitationValue eZ\Publish\API\Repository\Values\User\Limitation
return eZ\Publish\SPI\FieldType\ValidationError[]

valueSchema() public method

Returns info on valid $limitationValues.
public valueSchema ( ) : mixed[] | integer
return mixed[] | integer 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.