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\SignalSlot\Repository Class Reference

Repository class. More...

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

## Public Member Functions
| __construct (RepositoryInterface $repository, SignalDispatcher $signalDispatcher, ContentService $contentService, ContentTypeService $contentTypeService, FieldTypeService $fieldTypeService, RoleService $roleService, ObjectStateService $objectStateService, URLWildcardService $urlWildcardService, URLAliasService $urlAliasService, UserService $userService, SearchService $searchService, SectionService $sectionService, TrashService $trashService, LocationService $locationService, LanguageService $languageService, URLService $urlService, BookmarkService $bookmarkService, NotificationService $notificationService, UserPreferenceService $userPreferenceService)
| Construct repository object from aggregated repository and signal dispatcher. More...
| getCurrentUser ()
| getCurrentUserReference ()
| setCurrentUser (UserReference $user)
| sudo (callable $callback, RepositoryInterface $outerRepository=null)
| {} More...
| 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...
| getURLService ()
| Get URLService. More...
| getBookmarkService ()
| Get BookmarkService. More...
| getNotificationService ()
| Get NotificationService. More...
| getUserPreferenceService ()
| Get UserPreferenceService. More...
| getObjectStateService ()
| Get ObjectStateService. More...
| getRoleService ()
| Get RoleService. More...
| getSearchService ()
| Get SearchService. More...
| getFieldTypeService ()
| Get FieldTypeService. More...
| getPermissionResolver ()
| Get PermissionResolver. 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
| $signalDispatcher
| $contentService
| $sectionService
| $roleService
| $searchService
| $userService
| $languageService
| $locationService
| $trashService
| $contentTypeService
| $objectStateService
| $fieldTypeService
| $urlAliasService
| $urlWildcardService
| $urlService
| $bookmarkService
| $notificationService
| $userPreferenceService

## Detailed Description

Repository class.

Definition at line 18 of file Core/SignalSlot/Repository.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\SignalSlot\Repository::__construct | ( | RepositoryInterface | $repository,
|  | SignalDispatcher | $signalDispatcher,
|  | ContentService | $contentService,
|  | ContentTypeService | $contentTypeService,
|  | FieldTypeService | $fieldTypeService,
|  | RoleService | $roleService,
|  | ObjectStateService | $objectStateService,
|  | URLWildcardService | $urlWildcardService,
|  | URLAliasService | $urlAliasService,
|  | UserService | $userService,
|  | SearchService | $searchService,
|  | SectionService | $sectionService,
|  | TrashService | $trashService,
|  | LocationService | $locationService,
|  | LanguageService | $languageService,
|  | URLService | $urlService,
|  | BookmarkService | $bookmarkService,
|  | NotificationService | $notificationService,
|  | UserPreferenceService | $userPreferenceService
| ) |  |

Construct repository object from aggregated repository and signal dispatcher.

Parameters

  \eZ\Publish\API\Repository\Repository | $repository |
  \eZ\Publish\Core\SignalSlot\SignalDispatcher | $signalDispatcher |
  \eZ\Publish\Core\SignalSlot\ContentService | $contentService |
  \eZ\Publish\Core\SignalSlot\ContentTypeService | $contentTypeService |
  \eZ\Publish\Core\SignalSlot\FieldTypeService | $fieldTypeService |
  \eZ\Publish\Core\SignalSlot\RoleService | $roleService |
  \eZ\Publish\Core\SignalSlot\ObjectStateService | $objectStateService |
  \eZ\Publish\Core\SignalSlot\URLWildcardService | $urlWildcardService |
  \eZ\Publish\Core\SignalSlot\URLAliasService | $urlAliasService |
  \eZ\Publish\Core\SignalSlot\UserService | $userService |
  \eZ\Publish\Core\SignalSlot\SearchService | $searchService |
  \eZ\Publish\Core\SignalSlot\SectionService | $sectionService |
  \eZ\Publish\Core\SignalSlot\TrashService | $trashService |
  \eZ\Publish\Core\SignalSlot\LocationService | $locationService |
  \eZ\Publish\Core\SignalSlot\LanguageService | $languageService |
  \eZ\Publish\Core\SignalSlot\URLService | $urlService |
  \eZ\Publish\Core\SignalSlot\BookmarkService | $bookmarkService |
  \eZ\Publish\API\Repository\NotificationService | $notificationService |
  \eZ\Publish\Core\SignalSlot\UserPreferenceService | $userPreferenceService |

Definition at line 176 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$bookmarkService, eZ\Publish\Core\SignalSlot\Repository\$contentService, eZ\Publish\Core\SignalSlot\Repository\$contentTypeService, eZ\Publish\Core\SignalSlot\Repository\$fieldTypeService, eZ\Publish\Core\SignalSlot\Repository\$languageService, eZ\Publish\Core\SignalSlot\Repository\$locationService, eZ\Publish\Core\SignalSlot\Repository\$notificationService, eZ\Publish\Core\SignalSlot\Repository\$objectStateService, eZ\Publish\Core\SignalSlot\Repository\$repository, eZ\Publish\Core\SignalSlot\Repository\$roleService, eZ\Publish\Core\SignalSlot\Repository\$searchService, eZ\Publish\Core\SignalSlot\Repository\$sectionService, eZ\Publish\Core\SignalSlot\Repository\$signalDispatcher, eZ\Publish\Core\SignalSlot\Repository\$trashService, eZ\Publish\Core\SignalSlot\Repository\$urlAliasService, eZ\Publish\Core\SignalSlot\Repository\$urlService, eZ\Publish\Core\SignalSlot\Repository\$urlWildcardService, eZ\Publish\Core\SignalSlot\Repository\$userPreferenceService, and eZ\Publish\Core\SignalSlot\Repository\$userService.

## Member Function Documentation

## ◆ beginTransaction()

eZ\Publish\Core\SignalSlot\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 505 of file Core/SignalSlot/Repository.php.

## ◆ canUser()

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

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::canUser() instead.

Check if user has access to a given action on a given value object.

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

Exceptions

Implements eZ\Publish\API\Repository\Repository.

Definition at line 298 of file Core/SignalSlot/Repository.php.

## ◆ commit()

eZ\Publish\Core\SignalSlot\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 523 of file Core/SignalSlot/Repository.php.

## ◆ getBookmarkService()

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

Get BookmarkService.

Returns
  \eZ\Publish\API\Repository\BookmarkService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 424 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$bookmarkService.

## ◆ getContentLanguageService()

eZ\Publish\Core\SignalSlot\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 322 of file Core/SignalSlot/Repository.php.

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

## ◆ getContentService()

eZ\Publish\Core\SignalSlot\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 310 of file Core/SignalSlot/Repository.php.

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

## ◆ getContentTypeService()

eZ\Publish\Core\SignalSlot\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 335 of file Core/SignalSlot/Repository.php.

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

## ◆ getCurrentUser()

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

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::getCurrentUserReference() instead.

Get current user.

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

Implements eZ\Publish\API\Repository\Repository.

Definition at line 225 of file Core/SignalSlot/Repository.php.

## ◆ getCurrentUserReference()

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

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::getCurrentUserReference() instead.

Get current user ref.

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

Implements eZ\Publish\API\Repository\Repository.

Definition at line 237 of file Core/SignalSlot/Repository.php.

## ◆ getFieldTypeService()

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

Get FieldTypeService.

Returns
  \eZ\Publish\API\Repository\FieldTypeService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 484 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$fieldTypeService.

## ◆ getLocationService()

eZ\Publish\Core\SignalSlot\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 347 of file Core/SignalSlot/Repository.php.

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

## ◆ getNotificationService()

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

Get NotificationService.

Returns
  \eZ\Publish\API\Repository\NotificationService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 434 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$notificationService.

## ◆ getObjectStateService()

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

Get ObjectStateService.

Returns
  \eZ\Publish\API\Repository\ObjectStateService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 454 of file Core/SignalSlot/Repository.php.

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

## ◆ getPermissionResolver()

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

Get PermissionResolver.

Returns
  \eZ\Publish\API\Repository\PermissionResolver

Implements eZ\Publish\API\Repository\Repository.

Definition at line 494 of file Core/SignalSlot/Repository.php.

## ◆ getRoleService()

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

Get RoleService.

Returns
  \eZ\Publish\API\Repository\RoleService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 464 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$roleService.

## ◆ getSearchService()

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

Get SearchService.

Returns
  \eZ\Publish\API\Repository\SearchService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 474 of file Core/SignalSlot/Repository.php.

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

## ◆ getSectionService()

eZ\Publish\Core\SignalSlot\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 372 of file Core/SignalSlot/Repository.php.

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

## ◆ getTrashService()

eZ\Publish\Core\SignalSlot\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 360 of file Core/SignalSlot/Repository.php.

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

## ◆ getURLAliasService()

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

Get URLAliasService.

Returns
  \eZ\Publish\API\Repository\URLAliasService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 394 of file Core/SignalSlot/Repository.php.

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

## ◆ getURLService()

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

Get URLService.

Returns
  \eZ\Publish\API\Repository\URLService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 414 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$urlService.

## ◆ getURLWildcardService()

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

Get URLWildcardService.

Returns
  \eZ\Publish\API\Repository\URLWildcardService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 404 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$urlWildcardService.

## ◆ getUserPreferenceService()

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

Get UserPreferenceService.

Returns
  \eZ\Publish\API\Repository\UserPreferenceService

Implements eZ\Publish\API\Repository\Repository.

Definition at line 444 of file Core/SignalSlot/Repository.php.

References eZ\Publish\Core\SignalSlot\Repository\$userPreferenceService.

## ◆ getUserService()

eZ\Publish\Core\SignalSlot\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 384 of file Core/SignalSlot/Repository.php.

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

## ◆ hasAccess()

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

Deprecated:
  since 6.6, to be removed.

Use PermissionResolver::hasAccess() instead.

Check if user has access to a given module / function.

Low level function, use canUser instead if you have objects to check against.

Parameters

  string | $module |
  string | $function |
  \eZ\Publish\API\Repository\Values\User\UserReference | $user |

Returns
  bool|array Bool if user has full or no access, array if limitations if not

Implements eZ\Publish\API\Repository\Repository.

Definition at line 275 of file Core/SignalSlot/Repository.php.

## ◆ rollback()

eZ\Publish\Core\SignalSlot\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 541 of file Core/SignalSlot/Repository.php.

## ◆ setCurrentUser()

eZ\Publish\Core\SignalSlot\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 249 of file Core/SignalSlot/Repository.php.

## ◆ sudo()

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

{}

Definition at line 257 of file Core/SignalSlot/Repository.php.

## Member Data Documentation

## ◆ $bookmarkService

eZ\Publish\Core\SignalSlot\Repository::$bookmarkService
| protected

Definition at line 137 of file Core/SignalSlot/Repository.php.

Referenced by eZ\Publish\Core\SignalSlot\Repository\__construct(), and eZ\Publish\Core\SignalSlot\Repository\getBookmarkService().

## ◆ $contentService

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

Definition at line 39 of file Core/SignalSlot/Repository.php.

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

## ◆ $contentTypeService

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

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

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

## ◆ $fieldTypeService

eZ\Publish\Core\SignalSlot\Repository::$fieldTypeService
| protected

Definition at line 109 of file Core/SignalSlot/Repository.php.

Referenced by eZ\Publish\Core\SignalSlot\Repository\__construct(), and eZ\Publish\Core\SignalSlot\Repository\getFieldTypeService().

## ◆ $languageService

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

Definition at line 74 of file Core/SignalSlot/Repository.php.

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

## ◆ $locationService

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

Definition at line 81 of file Core/SignalSlot/Repository.php.

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

## ◆ $notificationService

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

Definition at line 144 of file Core/SignalSlot/Repository.php.

Referenced by eZ\Publish\Core\SignalSlot\Repository\__construct(), and eZ\Publish\Core\SignalSlot\Repository\getNotificationService().

## ◆ $objectStateService

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

Definition at line 102 of file Core/SignalSlot/Repository.php.

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

## ◆ $repository

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

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

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

## ◆ $roleService

eZ\Publish\Core\SignalSlot\Repository::$roleService
| protected

Definition at line 53 of file Core/SignalSlot/Repository.php.

Referenced by eZ\Publish\Core\SignalSlot\Repository\__construct(), and eZ\Publish\Core\SignalSlot\Repository\getRoleService().

## ◆ $searchService

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

Definition at line 60 of file Core/SignalSlot/Repository.php.

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

## ◆ $sectionService

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

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

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

## ◆ $signalDispatcher

eZ\Publish\Core\SignalSlot\Repository::$signalDispatcher
| protected

Definition at line 32 of file Core/SignalSlot/Repository.php.

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

## ◆ $trashService

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

Definition at line 88 of file Core/SignalSlot/Repository.php.

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

## ◆ $urlAliasService

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

Definition at line 116 of file Core/SignalSlot/Repository.php.

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

## ◆ $urlService

eZ\Publish\Core\SignalSlot\Repository::$urlService
| protected

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

Referenced by eZ\Publish\Core\SignalSlot\Repository\__construct(), and eZ\Publish\Core\SignalSlot\Repository\getURLService().

## ◆ $urlWildcardService

eZ\Publish\Core\SignalSlot\Repository::$urlWildcardService
| protected

Definition at line 123 of file Core/SignalSlot/Repository.php.

Referenced by eZ\Publish\Core\SignalSlot\Repository\__construct(), and eZ\Publish\Core\SignalSlot\Repository\getURLWildcardService().

## ◆ $userPreferenceService

eZ\Publish\Core\SignalSlot\Repository::$userPreferenceService
| protected

Definition at line 151 of file Core/SignalSlot/Repository.php.

Referenced by eZ\Publish\Core\SignalSlot\Repository\__construct(), and eZ\Publish\Core\SignalSlot\Repository\getUserPreferenceService().

## ◆ $userService

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

Definition at line 67 of file Core/SignalSlot/Repository.php.

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

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

- Core/SignalSlot/Repository.php

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