eZPublishCommunityProject  2012.12
eZ\Publish\API\Repository\Repository Interface Reference
+ Inheritance diagram for eZ\Publish\API\Repository\Repository:

Public Member Functions

 beginTransaction ()
 Begin transaction. More...
 
 canUser ($module, $function, ValueObject $object, ValueObject $target=null)
 Indicates if the current user is allowed to perform an action given by the function on the given objects. More...
 
 commit ()
 Commit transaction. More...
 
 getContentLanguageService ()
 Get Content Language Service. More...
 
 getContentService ()
 Get Content Service. More...
 
 getContentTypeService ()
 Get Content Type Service. More...
 
 getCurrentUser ()
 Get current user. More...
 
 getFieldTypeService ()
 Get FieldTypeService. More...
 
 getIOService ()
 Get IO Service. More...
 
 getLocationService ()
 Get Content Location Service. More...
 
 getObjectStateService ()
 Get ObjectStateService. More...
 
 getRoleService ()
 Get RoleService. More...
 
 getSearchService ()
 Get Search Service. More...
 
 getSectionService ()
 Get Content Section Service. More...
 
 getTrashService ()
 Get Content Trash service. More...
 
 getURLAliasService ()
 Get URLAliasService. More...
 
 getURLWildcardService ()
 Get URLWildcardService. More...
 
 getUserService ()
 Get User Service. More...
 
 hasAccess ($module, $function, User $user=null)
 
 rollback ()
 Rollback transaction. More...
 
 setCurrentUser (User $user)
 Sets the current user to the given $user. More...
 

Member Function Documentation

eZ\Publish\API\Repository\Repository::beginTransaction ( )

Begin transaction.

Begins an transaction, make sure you'll call commit or rollback when done, otherwise work will be lost.

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\REST\Client\Repository, and eZ\Publish\Core\SignalSlot\Repository.

eZ\Publish\API\Repository\Repository::canUser (   $module,
  $function,
ValueObject  $object,
ValueObject  $target = null 
)

Indicates if the current user is allowed to perform an action given by the function on the given objects.

Example: canUser( 'content', 'edit', $content, $location ); This will check edit permission on content given the specific location, if skipped if will check on all locations.

Example2: canUser( 'section', 'assign', $content, $section ); Check if user has access to assign $content to $section.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionIf any of the arguments are invalid
\eZ\Publish\API\Repository\Exceptions\BadStateExceptionIf value of the LimitationValue is unsupported
Parameters
string$moduleThe module, aka controller identifier to check permissions on
string$functionThe function, aka the controller action to check permissions on
\eZ\Publish\API\Repository\Values\ValueObject$objectThe object to check if the user has access to
\eZ\Publish\API\Repository\Values\ValueObject$targetThe location, parent or "assignment" value object
Returns
boolean

Implemented in eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

eZ\Publish\API\Repository\Repository::commit ( )

Commit transaction.

Commit transaction, or throw exceptions if no transactions has been started.

Exceptions
\RuntimeExceptionIf no transaction has been started

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\REST\Client\Repository, and eZ\Publish\Core\SignalSlot\Repository.

eZ\Publish\API\Repository\Repository::getContentLanguageService ( )

Get Content Language Service.

Get service object to perform operations on Content language objects

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

eZ\Publish\API\Repository\Repository::getContentService ( )

Get Content Service.

Get service object to perform operations on Content objects and it's aggregate members.

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

Referenced by eZ\Bundle\EzPublishRestBundle\ApiLoader\Factory\buildResponseVisitorDispatcher().

eZ\Publish\API\Repository\Repository::getContentTypeService ( )

Get Content Type Service.

Get service object to perform operations on Content Type objects and it's aggregate members. ( Group, Field & FieldCategory )

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

eZ\Publish\API\Repository\Repository::getCurrentUser ( )
eZ\Publish\API\Repository\Repository::getFieldTypeService ( )
eZ\Publish\API\Repository\Repository::getIOService ( )

Get IO Service.

Get service object to perform operations on binary files

Deprecated:
Will be removed in the future!
Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

eZ\Publish\API\Repository\Repository::getLocationService ( )

Get Content Location Service.

Get service object to perform operations on Location objects and subtrees

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

Referenced by eZ\Bundle\EzPublishRestBundle\ApiLoader\Factory\buildResponseVisitorDispatcher().

eZ\Publish\API\Repository\Repository::getObjectStateService ( )
eZ\Publish\API\Repository\Repository::getRoleService ( )
eZ\Publish\API\Repository\Repository::getSearchService ( )

Get Search Service.

Get search service that lets you find content objects

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

eZ\Publish\API\Repository\Repository::getSectionService ( )

Get Content Section Service.

Get Section service that lets you manipulate section objects

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\REST\Client\Repository, and eZ\Publish\Core\SignalSlot\Repository.

eZ\Publish\API\Repository\Repository::getTrashService ( )

Get Content Trash service.

Trash service allows to perform operations related to location trash (trash/untrash, load/list from trash...)

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\REST\Client\Repository, and eZ\Publish\Core\SignalSlot\Repository.

eZ\Publish\API\Repository\Repository::getURLAliasService ( )
eZ\Publish\API\Repository\Repository::getURLWildcardService ( )
eZ\Publish\API\Repository\Repository::getUserService ( )

Get User Service.

Get service object to perform operations on Users and UserGroup

Returns

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\REST\Client\Repository, and eZ\Publish\Core\SignalSlot\Repository.

eZ\Publish\API\Repository\Repository::hasAccess (   $module,
  $function,
User  $user = null 
)
Parameters
string$moduleThe module, aka controller identifier to check permissions on
string$functionThe function, aka the controller action to check permissions on
\eZ\Publish\API\Repository\Values\User\User$user
Returns
boolean|array if limitations are on this function an array of limitations is returned

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, and eZ\Publish\Core\REST\Client\Repository.

eZ\Publish\API\Repository\Repository::rollback ( )

Rollback transaction.

Rollback transaction, or throw exceptions if no transactions has been started.

Exceptions
\RuntimeExceptionIf no transaction has been started

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\REST\Client\Repository, and eZ\Publish\Core\SignalSlot\Repository.

eZ\Publish\API\Repository\Repository::setCurrentUser ( User  $user)

Sets the current user to the given $user.

Parameters
\eZ\Publish\API\Repository\Values\User\User$user
Returns
void

Implemented in eZ\Publish\Core\Repository\Repository, eZ\Publish\Core\SignalSlot\Repository, eZ\Publish\Core\REST\Client\Repository, and eZ\Publish\Core\REST\Client\IntegrationTestRepository.


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