eZPublishCommunityProject  2013.6
eZ\Publish\Core\Limitation\ParentUserGroupLimitationType Class Reference

ParentUserGroupLimitation is a Content limitation. More...

+ Inheritance diagram for eZ\Publish\Core\Limitation\ParentUserGroupLimitationType:
+ Collaboration diagram for eZ\Publish\Core\Limitation\ParentUserGroupLimitationType:

Public Member Functions

 acceptValue (APILimitationValue $limitationValue)
 Accepts a Limitation value and checks for structural validity. More...
 
 buildValue (array $limitationValues)
 Create the Limitation Value. More...
 
 evaluate (APILimitationValue $value, APIUser $currentUser, ValueObject $object, array $targets=array())
 Evaluate permission against content & target(placement/parent/assignment) More...
 
 getCriterion (APILimitationValue $value, APIUser $currentUser)
 Returns Criterion for use in find() query. More...
 
 validate (APILimitationValue $limitationValue)
 Makes sure LimitationValue->limitationValues is valid according to valueSchema(). 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, APIUser $currentUser, APIValueObject $object, array $targets=array())
 Evaluate permission against content and placement. More...
 

Additional Inherited Members

- Public Attributes inherited from eZ\Publish\SPI\Limitation\Type
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

ParentUserGroupLimitation is a Content limitation.

Member Function Documentation

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

Accepts a Limitation value and checks for structural validity.

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

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf the value does not match the expected type/structure
Parameters
\eZ\Publish\API\Repository\Values\User\Limitation$limitationValue

Implements eZ\Publish\SPI\Limitation\Type.

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

Create the Limitation Value.

Parameters
mixed[]$limitationValues
Returns

Implements eZ\Publish\SPI\Limitation\Type.

eZ\Publish\Core\Limitation\ParentUserGroupLimitationType::evaluate ( APILimitationValue  $value,
APIUser  $currentUser,
ValueObject  $object,
array  $targets = array() 
)

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

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf any of the arguments are invalid Example: If LimitationValue is instance of ContentTypeLimitationValue, and Type is SectionLimitationType.
\eZ\Publish\API\Repository\Exceptions\BadStateExceptionIf value of the LimitationValue is unsupported Example if OwnerLimitationValue->limitationValues[0] is not one of: [ 1, 2 ]
Parameters
\eZ\Publish\API\Repository\Values\User\Limitation$value
\eZ\Publish\API\Repository\Values\User\User$currentUser
\eZ\Publish\API\Repository\Values\ValueObject$object
\eZ\Publish\API\Repository\Values\ValueObject[]$targets An array of location, parent or "assignment" value objects
Returns
boolean

As long as SPI userHandler and API UserService does not speak the same language, this is the ugly truth;

eZ\Publish\Core\Limitation\ParentUserGroupLimitationType::getCriterion ( APILimitationValue  $value,
APIUser  $currentUser 
)

Returns Criterion for use in find() query.

Parameters
\eZ\Publish\API\Repository\Values\User\Limitation$value
\eZ\Publish\API\Repository\Values\User\User$currentUser
Returns

Implements eZ\Publish\SPI\Limitation\Type.

eZ\Publish\Core\Limitation\ParentUserGroupLimitationType::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
[]

Implements eZ\Publish\SPI\Limitation\Type.

eZ\Publish\Core\Limitation\ParentUserGroupLimitationType::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.


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