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\UserPreferenceService Class Reference
Inheritance diagram for eZ\Publish\Core\SignalSlot\UserPreferenceService:

## Public Member Functions
| __construct (UserPreferenceServiceInterface $service, SignalDispatcher $signalDispatcher)
| setUserPreference (array $userPreferenceSetStructs)
  | {Set user preference. Parameters
  \eZ\Publish\API\Repository\Values\UserPreference\UserPreferenceSetStruct[] | $userPreferenceSetStructs |
  Exceptions
} More...
| getUserPreference (string $userPreferenceName)
  | {Get currently logged user preference by key. Parameters
  string | $userPreferenceName |
  Returns \eZ\Publish\API\Repository\Values\UserPreference\UserPreference Exceptions
} More...
| loadUserPreferences (int $offset=0, int $limit=25)
  | {Get currently logged user preferences. Parameters
  int | $offset | the start offset for paging
  int | $limit | the number of user preferences returned
  Exceptions
} More...
| getUserPreferenceCount ()
| {Get count of total preferences for currently logged user. Returns int } More...

## Protected Attributes
| $service
| $signalDispatcher

## Detailed Description

Definition at line 16 of file Core/SignalSlot/UserPreferenceService.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\SignalSlot\UserPreferenceService::__construct | ( | UserPreferenceServiceInterface | $service,
|  | SignalDispatcher | $signalDispatcher
| ) |  |

Parameters

  \eZ\Publish\API\Repository\UserPreferenceService | $service |
  \eZ\Publish\Core\SignalSlot\SignalDispatcher | $signalDispatcher |

Definition at line 28 of file Core/SignalSlot/UserPreferenceService.php.

References eZ\Publish\Core\SignalSlot\UserPreferenceService\$service, and eZ\Publish\Core\SignalSlot\UserPreferenceService\$signalDispatcher.

## Member Function Documentation

## ◆ getUserPreference()

eZ\Publish\Core\SignalSlot\UserPreferenceService::getUserPreference | ( | string | $userPreferenceName | ) |

{Get currently logged user preference by key.

Parameters

  string | $userPreferenceName |

Returns
  \eZ\Publish\API\Repository\Values\UserPreference\UserPreference

Exceptions

}

Implements eZ\Publish\API\Repository\UserPreferenceService.

Definition at line 52 of file Core/SignalSlot/UserPreferenceService.php.

## ◆ getUserPreferenceCount()

eZ\Publish\Core\SignalSlot\UserPreferenceService::getUserPreferenceCount | ( |  | ) |

{Get count of total preferences for currently logged user.

Returns
  int

}

Implements eZ\Publish\API\Repository\UserPreferenceService.

Definition at line 68 of file Core/SignalSlot/UserPreferenceService.php.

## ◆ loadUserPreferences()

eZ\Publish\Core\SignalSlot\UserPreferenceService::loadUserPreferences | ( | int | $offset = `0`,
|  | int | $limit = `25`
| ) |  |

{Get currently logged user preferences.

Parameters

  int | $offset | the start offset for paging
  int | $limit | the number of user preferences returned

Exceptions

}

Implements eZ\Publish\API\Repository\UserPreferenceService.

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

## ◆ setUserPreference()

eZ\Publish\Core\SignalSlot\UserPreferenceService::setUserPreference | ( | array | $userPreferenceSetStructs | ) |

{Set user preference.

Parameters

  \eZ\Publish\API\Repository\Values\UserPreference\UserPreferenceSetStruct[] | $userPreferenceSetStructs |

Exceptions

}

Implements eZ\Publish\API\Repository\UserPreferenceService.

Definition at line 37 of file Core/SignalSlot/UserPreferenceService.php.

## Member Data Documentation

## ◆ $service

eZ\Publish\Core\SignalSlot\UserPreferenceService::$service
| protected

Definition at line 19 of file Core/SignalSlot/UserPreferenceService.php.

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

## ◆ $signalDispatcher

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

Definition at line 22 of file Core/SignalSlot/UserPreferenceService.php.

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

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

- Core/SignalSlot/UserPreferenceService.php

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