Class

eZ\Publish\Core\REST\Client\Repository

class Repository implements Repository

REST Client Repository.

Methods

__construct(HttpClient $client, Dispatcher $inputDispatcher, Visitor $outputVisitor, RequestParser $requestParser, array $fieldTypes)

Instantiates the REST Client repository.

User getCurrentUser()

UserReference getCurrentUserReference()

void setCurrentUser(UserReference $user)

bool|Limitation[] hasAccess(string $module, string $function, UserReference $user = null)

bool canUser(string $module, string $function, ValueObject $object, mixed $targets = null)

ContentService getContentService()

Get Content Service.

LanguageService getContentLanguageService()

Get Content Language Service.

ContentTypeService getContentTypeService()

Get Content Type Service.

LocationService getLocationService()

Get Content Location Service.

TrashService getTrashService()

Get Content Trash service.

SectionService getSectionService()

Get Content Section Service.

SearchService getSearchService()

Get Search Service.

UserService getUserService()

Get User Service.

IOService getIOService()

Get IO Service.

RoleService getRoleService()

Get RoleService.

URLAliasService getURLAliasService()

Get URLAliasService.

URLWildcardService getURLWildcardService()

Get URLWildcardService.

ObjectStateService getObjectStateService()

Get ObjectStateService.

FieldTypeService getFieldTypeService()

Get FieldTypeService.

PermissionResolver getPermissionResolver()

Get PermissionResolver.

URLService getURLService()

Get URLService.

beginTransaction()

Begin transaction.

commit()

Commit transaction.

rollback()

Rollback transaction.

Details

at line 122
public __construct(HttpClient $client, Dispatcher $inputDispatcher, Visitor $outputVisitor, RequestParser $requestParser, array $fieldTypes)

Instantiates the REST Client repository.

Parameters

HttpClient $client
Dispatcher $inputDispatcher
Visitor $outputVisitor
RequestParser $requestParser
array $fieldTypes

at line 138
public User getCurrentUser()

Return Value

User

at line 150
public UserReference getCurrentUserReference()

Return Value

UserReference

at line 164
public void setCurrentUser(UserReference $user)

Parameters

UserReference $user

Return Value

void

at line 180
public bool|Limitation[] hasAccess(string $module, string $function, UserReference $user = null)

Parameters

string $module The module, aka controller identifier to check permissions on
string $function The function, aka the controller action to check permissions on
UserReference $user

Return Value

bool|Limitation[] if limitations are on this function an array of limitations is returned

at line 201
public bool canUser(string $module, string $function, ValueObject $object, mixed $targets = null)

Parameters

string $module The module, aka controller identifier to check permissions on
string $function The function, aka the controller action to check permissions on
ValueObject $object The object to check if the user has access to
mixed $targets The location, parent or "assignment" value object, or an array of the same

Return Value

bool

Exceptions

InvalidArgumentException If any of the arguments are invalid
BadStateException If value of the LimitationValue is unsupported

at line 213
public ContentService getContentService()

Get Content Service.

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

Return Value

ContentService

at line 235
public LanguageService getContentLanguageService()

Get Content Language Service.

Get service object to perform operations on Content language objects

Return Value

LanguageService

at line 259
public ContentTypeService getContentTypeService()

Get Content Type Service.

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

Return Value

ContentTypeService

at line 280
public LocationService getLocationService()

Get Content Location Service.

Get service object to perform operations on Location objects and subtrees

Return Value

LocationService

at line 302
public TrashService getTrashService()

Get Content Trash service.

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

Return Value

TrashService

at line 324
public SectionService getSectionService()

Get Content Section Service.

Get Section service that lets you manipulate section objects

Return Value

SectionService

at line 345
public SearchService getSearchService()

Get Search Service.

Get search service that lets you find content objects

Return Value

SearchService

at line 357
public UserService getUserService()

Get User Service.

Get service object to perform operations on Users and UserGroup

Return Value

UserService

at line 378
public IOService getIOService()

Get IO Service.

Get service object to perform operations on binary files

Return Value

IOService

at line 397
public RoleService getRoleService()

Get RoleService.

Return Value

RoleService

at line 417
public URLAliasService getURLAliasService()

Get URLAliasService.

Return Value

URLAliasService

at line 436
public URLWildcardService getURLWildcardService()

Get URLWildcardService.

Return Value

URLWildcardService

at line 446
public ObjectStateService getObjectStateService()

Get ObjectStateService.

Return Value

ObjectStateService

at line 465
public FieldTypeService getFieldTypeService()

Get FieldTypeService.

Return Value

FieldTypeService

at line 479
public PermissionResolver getPermissionResolver()

Get PermissionResolver.

Return Value

PermissionResolver

at line 489
public URLService getURLService()

Get URLService.

Return Value

URLService

at line 500
public beginTransaction()

Begin transaction.

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

at line 512
public commit()

Commit transaction.

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

Exceptions

RuntimeException If no transaction has been started

at line 524
public rollback()

Rollback transaction.

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

Exceptions

RuntimeException If no transaction has been started