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

Public Member Functions | Protected Attributes | Private Member Functions | List of all members
eZ\Publish\Core\Repository\BookmarkService Class Reference
Inheritance diagram for eZ\Publish\Core\Repository\BookmarkService:

## Public Member Functions
| __construct (RepositoryInterface $repository, BookmarkHandler $bookmarkHandler)
| BookmarkService constructor. More...
| createBookmark (Location $location)
  | {Add location to bookmarks. Parameters
  \eZ\Publish\API\Repository\Values\Content\Location | $location |
  Exceptions
} More...
| deleteBookmark (Location $location)
  | {Delete given location from bookmarks. Parameters
  \eZ\Publish\API\Repository\Values\Content\Location | $location |
  Exceptions
} More...
| loadBookmarks (int $offset=0, int $limit=25)
  | {List bookmarked locations. Parameters
  int | $offset | the start offset for paging
  int | $limit | the number of bookmarked locations returned
  Exceptions
} More...
| isBookmarked (Location $location)
  | {Return true if location is bookmarked. Parameters
  \eZ\Publish\API\Repository\Values\Content\Location | $location |
Returns bool } More...

## Protected Attributes
| $repository
| $bookmarkHandler

## Private Member Functions
| getCurrentUserId ()

## Detailed Description

Definition at line 21 of file Core/Repository/BookmarkService.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Repository\BookmarkService::__construct | ( | RepositoryInterface | $repository,
|  | BookmarkHandler | $bookmarkHandler
| ) |  |

BookmarkService constructor.

Parameters

  \eZ\Publish\API\Repository\Repository | $repository |
  \eZ\Publish\SPI\Persistence\Bookmark\Handler | $bookmarkHandler |

Definition at line 35 of file Core/Repository/BookmarkService.php.

References eZ\Publish\Core\Repository\BookmarkService\$bookmarkHandler, and eZ\Publish\Core\Repository\BookmarkService\$repository.

## Member Function Documentation

## ◆ createBookmark()

eZ\Publish\Core\Repository\BookmarkService::createBookmark | ( | Location | $location | ) |

{Add location to bookmarks.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Location | $location |

Exceptions

}

Implements eZ\Publish\API\Repository\BookmarkService.

Definition at line 44 of file Core/Repository/BookmarkService.php.

References eZ\Publish\Core\Repository\BookmarkService\getCurrentUserId(), and eZ\Publish\Core\Repository\BookmarkService\isBookmarked().

## ◆ deleteBookmark()

eZ\Publish\Core\Repository\BookmarkService::deleteBookmark | ( | Location | $location | ) |

{Delete given location from bookmarks.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Location | $location |

Exceptions

}

Implements eZ\Publish\API\Repository\BookmarkService.

Definition at line 70 of file Core/Repository/BookmarkService.php.

References eZ\Publish\Core\Repository\BookmarkService\getCurrentUserId().

## ◆ getCurrentUserId()

eZ\Publish\Core\Repository\BookmarkService::getCurrentUserId | ( |  | ) |
| private

Definition at line 124 of file Core/Repository/BookmarkService.php.

Referenced by eZ\Publish\Core\Repository\BookmarkService\createBookmark(), eZ\Publish\Core\Repository\BookmarkService\deleteBookmark(), eZ\Publish\Core\Repository\BookmarkService\isBookmarked(), and eZ\Publish\Core\Repository\BookmarkService\loadBookmarks().

## ◆ isBookmarked()

eZ\Publish\Core\Repository\BookmarkService::isBookmarked | ( | Location | $location | ) |

{Return true if location is bookmarked.

Parameters

  \eZ\Publish\API\Repository\Values\Content\Location | $location |

Returns
  bool

}

Implements eZ\Publish\API\Repository\BookmarkService.

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

References eZ\Publish\Core\Repository\BookmarkService\getCurrentUserId().

Referenced by eZ\Publish\Core\Repository\BookmarkService\createBookmark().

## ◆ loadBookmarks()

eZ\Publish\Core\Repository\BookmarkService::loadBookmarks | ( | int | $offset = `0`,
|  | int | $limit = `25`
| ) |  |

{List bookmarked locations.

Parameters

  int | $offset | the start offset for paging
  int | $limit | the number of bookmarked locations returned

Exceptions

}

Implements eZ\Publish\API\Repository\BookmarkService.

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

References eZ\Publish\Core\Repository\BookmarkService\getCurrentUserId().

## Member Data Documentation

## ◆ $bookmarkHandler

eZ\Publish\Core\Repository\BookmarkService::$bookmarkHandler
| protected

Definition at line 27 of file Core/Repository/BookmarkService.php.

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

## ◆ $repository

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

Definition at line 24 of file Core/Repository/BookmarkService.php.

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

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

- Core/Repository/BookmarkService.php

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