vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/SiteAccessAware/Repository.php line 102

Open in your IDE?
  1. <?php
  2. /**
  3.  * @copyright Copyright (C) eZ Systems AS. All rights reserved.
  4.  * @license For full copyright and license information view LICENSE file distributed with this source code.
  5.  */
  6. namespace eZ\Publish\Core\Repository\SiteAccessAware;
  7. use eZ\Publish\API\Repository\Repository as RepositoryInterface;
  8. use eZ\Publish\API\Repository\Values\ValueObject;
  9. use eZ\Publish\API\Repository\Values\User\UserReference;
  10. /**
  11.  * Repository class.
  12.  */
  13. class Repository implements RepositoryInterface
  14. {
  15.     /** @var \eZ\Publish\API\Repository\Repository */
  16.     protected $repository;
  17.     /** @var \eZ\Publish\API\Repository\ContentService */
  18.     protected $contentService;
  19.     /** @var \eZ\Publish\API\Repository\SectionService */
  20.     protected $sectionService;
  21.     /** @var \eZ\Publish\API\Repository\SearchService */
  22.     protected $searchService;
  23.     /** @var \eZ\Publish\API\Repository\UserService */
  24.     protected $userService;
  25.     /** @var \eZ\Publish\API\Repository\LanguageService */
  26.     protected $languageService;
  27.     /** @var \eZ\Publish\API\Repository\LocationService */
  28.     protected $locationService;
  29.     /** @var \eZ\Publish\API\Repository\TrashService */
  30.     protected $trashService;
  31.     /** @var \eZ\Publish\API\Repository\ContentTypeService */
  32.     protected $contentTypeService;
  33.     /** @var \eZ\Publish\API\Repository\ObjectStateService */
  34.     protected $objectStateService;
  35.     /** @var \eZ\Publish\API\Repository\URLAliasService */
  36.     protected $urlAliasService;
  37.     /** @var \eZ\Publish\Core\Repository\NotificationService */
  38.     protected $notificationService;
  39.     /**
  40.      * Construct repository object from aggregated repository.
  41.      */
  42.     public function __construct(
  43.         RepositoryInterface $repository,
  44.         ContentService $contentService,
  45.         ContentTypeService $contentTypeService,
  46.         ObjectStateService $objectStateService,
  47.         URLAliasService $urlAliasService,
  48.         UserService $userService,
  49.         SearchService $searchService,
  50.         SectionService $sectionService,
  51.         TrashService $trashService,
  52.         LocationService $locationService,
  53.         LanguageService $languageService,
  54.         NotificationService $notificationService
  55.     ) {
  56.         $this->repository $repository;
  57.         $this->contentService $contentService;
  58.         $this->contentTypeService $contentTypeService;
  59.         $this->objectStateService $objectStateService;
  60.         $this->urlAliasService $urlAliasService;
  61.         $this->userService $userService;
  62.         $this->searchService $searchService;
  63.         $this->sectionService $sectionService;
  64.         $this->trashService $trashService;
  65.         $this->locationService $locationService;
  66.         $this->languageService $languageService;
  67.         $this->notificationService $notificationService;
  68.     }
  69.     public function getCurrentUser()
  70.     {
  71.         return $this->repository->getCurrentUser();
  72.     }
  73.     public function getCurrentUserReference()
  74.     {
  75.         return $this->repository->getCurrentUserReference();
  76.     }
  77.     public function setCurrentUser(UserReference $user)
  78.     {
  79.         return $this->repository->setCurrentUser($user);
  80.     }
  81.     public function sudo(callable $callbackRepositoryInterface $outerRepository null)
  82.     {
  83.         return $this->repository->sudo($callback$outerRepository ?? $this);
  84.     }
  85.     public function hasAccess($module$functionUserReference $user null)
  86.     {
  87.         return $this->repository->hasAccess($module$function$user);
  88.     }
  89.     public function canUser($module$functionValueObject $object$targets null)
  90.     {
  91.         return $this->repository->canUser($module$function$object$targets);
  92.     }
  93.     public function getContentService()
  94.     {
  95.         return $this->contentService;
  96.     }
  97.     public function getContentLanguageService()
  98.     {
  99.         return $this->languageService;
  100.     }
  101.     public function getContentTypeService()
  102.     {
  103.         return $this->contentTypeService;
  104.     }
  105.     public function getLocationService()
  106.     {
  107.         return $this->locationService;
  108.     }
  109.     public function getTrashService()
  110.     {
  111.         return $this->trashService;
  112.     }
  113.     public function getSectionService()
  114.     {
  115.         return $this->sectionService;
  116.     }
  117.     public function getUserService()
  118.     {
  119.         return $this->userService;
  120.     }
  121.     public function getURLAliasService()
  122.     {
  123.         return $this->urlAliasService;
  124.     }
  125.     public function getURLWildcardService()
  126.     {
  127.         return $this->repository->getURLWildcardService();
  128.     }
  129.     public function getObjectStateService()
  130.     {
  131.         return $this->objectStateService;
  132.     }
  133.     public function getRoleService()
  134.     {
  135.         return $this->repository->getRoleService();
  136.     }
  137.     public function getSearchService()
  138.     {
  139.         return $this->searchService;
  140.     }
  141.     public function getFieldTypeService()
  142.     {
  143.         return $this->repository->getFieldTypeService();
  144.     }
  145.     public function getPermissionResolver()
  146.     {
  147.         return $this->repository->getPermissionResolver();
  148.     }
  149.     public function getURLService()
  150.     {
  151.         return $this->repository->getURLService();
  152.     }
  153.     public function getBookmarkService()
  154.     {
  155.         return $this->repository->getBookmarkService();
  156.     }
  157.     public function getNotificationService()
  158.     {
  159.         return $this->repository->getNotificationService();
  160.     }
  161.     public function getUserPreferenceService()
  162.     {
  163.         return $this->repository->getUserPreferenceService();
  164.     }
  165.     public function beginTransaction()
  166.     {
  167.         return $this->repository->beginTransaction();
  168.     }
  169.     public function commit()
  170.     {
  171.         return $this->repository->commit();
  172.     }
  173.     public function rollback()
  174.     {
  175.         return $this->repository->rollback();
  176.     }
  177. }