Skip to content

Commit

Permalink
Merge pull request netgen#77 from netgen/bookmark_service
Browse files Browse the repository at this point in the history
Add getBookmarkService method to aggregate repository
  • Loading branch information
emodric committed Jun 8, 2018
2 parents b7c0b68 + d231ab4 commit 0c6d2c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Core/Repository/Aggregate/Repository.php
Expand Up @@ -6,6 +6,7 @@
use eZ\Publish\API\Repository\Values\ValueObject;
use eZ\Publish\API\Repository\Values\User\UserReference;
use Closure;
use RuntimeException;

/**
* Aggregate implementation of Repository interface.
Expand Down Expand Up @@ -78,6 +79,15 @@ public function canUser($module, $function, ValueObject $object, $targets = null
return $this->ezRepository->canUser($module, $function, $object, $targets);
}

public function getBookmarkService()
{
if (!method_exists($this->ezRepository, 'getBookmarkService')) {
throw new RuntimeException(sprintf('getBookmarkService method does not exist in %s class', get_class($this->ezRepository)));
}

return $this->ezRepository->getBookmarkService();
}

public function getContentService()
{
return $this->ezRepository->getContentService();
Expand Down

0 comments on commit 0c6d2c0

Please sign in to comment.