eZPublishCommunityProject  2013.9
eZ\Publish\Core\Limitation\SiteAccessLimitationType Class Reference

SiteAccessLimitation is a User limitation. More...

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

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=null)
 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\SPI\Limitation\Type
 evaluate (APILimitationValue $value, APIUser $currentUser, APIValueObject $object, array $targets=null)
 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
 

Detailed Description

SiteAccessLimitation is a User limitation.

Member Function Documentation

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
\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\SiteAccessLimitationType::buildValue ( array  $limitationValues)

Create the Limitation Value.

Parameters
mixed[]$limitationValues
Returns

Implements eZ\Publish\SPI\Limitation\Type.

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

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[]|null$targets The context of the $object, like Location of Content, if null none where provided by caller
Returns
boolean
Todo:
Use current siteaccess as dependency in constructor, or define a way it can be injected in this function 4.x limitationValues in default 64bit mode is: sprintf( 'u', crc32( $siteAccessName ) )
eZ\Publish\Core\Limitation\SiteAccessLimitationType::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\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
[]

Implements eZ\Publish\SPI\Limitation\Type.

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.


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