Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | List of all members
eZ\Publish\Core\Repository\SiteAccessAware\Repository Class Reference

Repository class. More...

Inheritance diagram for eZ\Publish\Core\Repository\SiteAccessAware\Repository:

## Public Member Functions
| __construct (RepositoryInterface $repository, ContentService $contentService, ContentTypeService $contentTypeService, ObjectStateService $objectStateService, URLAliasService $urlAliasService, UserService $userService, SearchService $searchService, SectionService $sectionService, TrashService $trashService, LocationService $locationService, LanguageService $languageService, NotificationService $notificationService)
| Construct repository object from aggregated repository. More...
| getCurrentUser ()
| getCurrentUserReference ()
| setCurrentUser (UserReference $user)
| sudo (callable $callback, RepositoryInterface $outerRepository=null)
| hasAccess ($module, $function, UserReference $user=null)
| canUser ($module, $function, ValueObject $object, $targets=null)
| getContentService ()
| Get Content Service. More...
| getContentLanguageService ()
| Get Content Language Service. More...
| getContentTypeService ()
| Get Content Type Service. More...
| getLocationService ()
| Get Content Location Service. More...
| getTrashService ()
| Get Content Trash service. More...
| getSectionService ()
| Get Content Section Service. More...
| getUserService ()
| Get User Service. More...
| getURLAliasService ()
| Get URLAliasService. More...
| getURLWildcardService ()
| Get URLWildcardService. More...
| getObjectStateService ()
| Get ObjectStateService. More...
| getRoleService ()
| Get RoleService. More...
| getSearchService ()
| Get Search Service. More...
| getFieldTypeService ()
| Get FieldTypeService. More...
| getPermissionResolver ()
| Get PermissionResolver. More...
| getURLService ()
| Get URLService. More...
| getBookmarkService ()
| Get BookmarkService. More...
| getNotificationService ()
| Get NotificationService. More...
| getUserPreferenceService ()
| Get UserPreferenceService. More...
| beginTransaction ()
| Begin transaction. More...
| commit ()
| Commit transaction. More...
| rollback ()
| Rollback transaction. More...
Public Member Functions inherited from eZ\Publish\API\Repository\Repository
| sudo (callable $callback, Repository $outerRepository=null)
| Allows API execution to be performed with full access, sand-boxed. More...

## Protected Attributes
| $repository
| $contentService
| $sectionService
| $searchService
| $userService
| $languageService
| $locationService
| $trashService
| $contentTypeService
| $objectStateService
| $urlAliasService
| $notificationService

## Detailed Description

Repository class.

Definition at line 16 of file Core/Repository/SiteAccessAware/Repository.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::__construct | ( | RepositoryInterface | $repository,
|  | ContentService | $contentService,
|  | ContentTypeService | $contentTypeService,
|  | ObjectStateService | $objectStateService,
|  | URLAliasService | $urlAliasService,
|  | UserService | $userService,
|  | SearchService | $searchService,
|  | SectionService | $sectionService,
|  | TrashService | $trashService,
|  | LocationService | $locationService,
|  | LanguageService | $languageService,
|  | NotificationService | $notificationService
| ) |  |

Construct repository object from aggregated repository.

Definition at line 57 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$contentService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$contentTypeService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$languageService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$locationService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$notificationService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$objectStateService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$repository, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$searchService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$sectionService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$trashService, eZ\Publish\Core\Repository\SiteAccessAware\Repository\$urlAliasService, and eZ\Publish\Core\Repository\SiteAccessAware\Repository\$userService.

## Member Function Documentation

## ◆ beginTransaction()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::beginTransaction | ( |  | ) |

Begin transaction.

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

Implements eZ\Publish\API\Repository\Repository.

Definition at line 205 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ canUser()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::canUser | ( |  | $module,
|  |  | $function,
|  | ValueObject | $object,
|  |  | $targets = `null`
| ) |  |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::canUser() instead.

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

Implements eZ\Publish\API\Repository\Repository.

Definition at line 110 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ commit()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::commit | ( |  | ) |

Commit transaction.

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

Exceptions

Implements eZ\Publish\API\Repository\Repository.

Definition at line 210 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getBookmarkService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getBookmarkService | ( |  | ) |

Get BookmarkService.

Returns
  \eZ\Publish\API\Repository\BookmarkService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 190 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getContentLanguageService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getContentLanguageService | ( |  | ) |

Get Content Language Service.

Get service object to perform operations on Content language objects

Returns
  \eZ\Publish\API\Repository\LanguageService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 120 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$languageService.

## ◆ getContentService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getContentService | ( |  | ) |

Get Content Service.

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

Returns
  \eZ\Publish\API\Repository\ContentService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 115 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$contentService.

## ◆ getContentTypeService()

eZ\Publish\Core\Repository\SiteAccessAware\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
  \eZ\Publish\API\Repository\ContentTypeService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 125 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$contentTypeService.

## ◆ getCurrentUser()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getCurrentUser | ( |  | ) |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::getCurrentUserReference() instead.

Get current user.

Loads the full user object if not already loaded, if you only need to know user id use {

See also
  getCurrentUserReference()}

Returns
  \eZ\Publish\API\Repository\Values\User\User

Implements eZ\Publish\API\Repository\Repository.

Definition at line 85 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getCurrentUserReference()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getCurrentUserReference | ( |  | ) |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::getCurrentUserReference() instead.

Get current user reference.

Since
  5.4.5

Returns
  \eZ\Publish\API\Repository\Values\User\UserReference

Implements eZ\Publish\API\Repository\Repository.

Definition at line 90 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getFieldTypeService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getFieldTypeService | ( |  | ) |

Get FieldTypeService.

Returns
  \eZ\Publish\API\Repository\FieldTypeService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 175 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getLocationService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getLocationService | ( |  | ) |

Get Content Location Service.

Get service object to perform operations on Location objects and subtrees

Returns
  \eZ\Publish\API\Repository\LocationService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 130 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$locationService.

## ◆ getNotificationService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getNotificationService | ( |  | ) |

Get NotificationService.

Returns
  \eZ\Publish\API\Repository\NotificationService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 195 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getObjectStateService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getObjectStateService | ( |  | ) |

Get ObjectStateService.

Returns
  \eZ\Publish\API\Repository\ObjectStateService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 160 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$objectStateService.

## ◆ getPermissionResolver()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getPermissionResolver | ( |  | ) |

Get PermissionResolver.

Returns
  \eZ\Publish\API\Repository\PermissionResolver

Implements eZ\Publish\API\Repository\Repository.

Definition at line 180 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getRoleService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getRoleService | ( |  | ) |

Get RoleService.

Returns
  \eZ\Publish\API\Repository\RoleService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 165 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getSearchService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getSearchService | ( |  | ) |

Get Search Service.

Get search service that lets you find content objects

Returns
  \eZ\Publish\API\Repository\SearchService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 170 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$searchService.

## ◆ getSectionService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getSectionService | ( |  | ) |

Get Content Section Service.

Get Section service that lets you manipulate section objects

Returns
  \eZ\Publish\API\Repository\SectionService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 140 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$sectionService.

## ◆ getTrashService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getTrashService | ( |  | ) |

Get Content Trash service.

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

Returns
  \eZ\Publish\API\Repository\TrashService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 135 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$trashService.

## ◆ getURLAliasService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getURLAliasService | ( |  | ) |

Get URLAliasService.

Returns
  \eZ\Publish\API\Repository\URLAliasService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 150 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$urlAliasService.

## ◆ getURLService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getURLService | ( |  | ) |

Get URLService.

Returns
  \eZ\Publish\API\Repository\URLService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 185 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getURLWildcardService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getURLWildcardService | ( |  | ) |

Get URLWildcardService.

Returns
  \eZ\Publish\API\Repository\URLWildcardService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 155 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getUserPreferenceService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getUserPreferenceService | ( |  | ) |

Get UserPreferenceService.

Returns
  \eZ\Publish\API\Repository\UserPreferenceService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 200 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ getUserService()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::getUserService | ( |  | ) |

Get User Service.

Get service object to perform operations on Users and UserGroup

Returns
  \eZ\Publish\API\Repository\UserService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 145 of file Core/Repository/SiteAccessAware/Repository.php.

References eZ\Publish\Core\Repository\SiteAccessAware\Repository\$userService.

## ◆ hasAccess()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::hasAccess | ( |  | $module,
|  |  | $function,
|  | UserReference | $user = `null`
| ) |  |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::hasAccess() instead.

Exceptions

Implements eZ\Publish\API\Repository\Repository.

Definition at line 105 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ rollback()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::rollback | ( |  | ) |

Rollback transaction.

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

Exceptions

Implements eZ\Publish\API\Repository\Repository.

Definition at line 215 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ setCurrentUser()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::setCurrentUser | ( | UserReference | $user | ) |

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::setCurrentUserReference() instead.

Sets the current user to the given $user.

Parameters

  \eZ\Publish\API\Repository\Values\User\UserReference | $user |

Implements eZ\Publish\API\Repository\Repository.

Definition at line 95 of file Core/Repository/SiteAccessAware/Repository.php.

## ◆ sudo()

eZ\Publish\Core\Repository\SiteAccessAware\Repository::sudo | ( | callable | $callback,
|  | RepositoryInterface | $outerRepository = `null`
| ) |  |

Definition at line 100 of file Core/Repository/SiteAccessAware/Repository.php.

## Member Data Documentation

## ◆ $contentService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$contentService
| protected

Definition at line 22 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getContentService().

## ◆ $contentTypeService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$contentTypeService
| protected

Definition at line 43 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getContentTypeService().

## ◆ $languageService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$languageService
| protected

Definition at line 34 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getContentLanguageService().

## ◆ $locationService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$locationService
| protected

Definition at line 37 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getLocationService().

## ◆ $notificationService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$notificationService
| protected

Definition at line 52 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct().

## ◆ $objectStateService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$objectStateService
| protected

Definition at line 46 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getObjectStateService().

## ◆ $repository

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$repository
| protected

Definition at line 19 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct().

## ◆ $searchService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$searchService
| protected

Definition at line 28 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getSearchService().

## ◆ $sectionService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$sectionService
| protected

Definition at line 25 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getSectionService().

## ◆ $trashService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$trashService
| protected

Definition at line 40 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getTrashService().

## ◆ $urlAliasService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$urlAliasService
| protected

Definition at line 49 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getURLAliasService().

## ◆ $userService

eZ\Publish\Core\Repository\SiteAccessAware\Repository::$userService
| protected

Definition at line 31 of file Core/Repository/SiteAccessAware/Repository.php.

Referenced by eZ\Publish\Core\Repository\SiteAccessAware\Repository\__construct(), and eZ\Publish\Core\Repository\SiteAccessAware\Repository\getUserService().

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

- Core/Repository/SiteAccessAware/Repository.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.