Favorites
extends AbstractPlugin
in package
Action helper to perform favorites-related actions
Tags
Table of Contents
- $favoritesService : FavoritesService
- __construct() : mixed
- Constructor
- delete() : void
- Delete a group of favorites.
- saveBulk() : array<string|int, mixed>
- Save a group of records to the user's favorites.
Properties
$favoritesService
protected
FavoritesService
$favoritesService
Methods
__construct()
Constructor
public
__construct(FavoritesService $favoritesService) : mixed
Parameters
- $favoritesService : FavoritesService
-
Favorites service
Return values
mixed —delete()
Delete a group of favorites.
public
delete(array<string|int, mixed> $ids, mixed $listID, UserEntityInterface $user) : void
Parameters
- $ids : array<string|int, mixed>
-
Array of IDs in source|id format.
- $listID : mixed
-
ID of list to delete from (null for all lists)
- $user : UserEntityInterface
-
Logged in user
Tags
Return values
void —saveBulk()
Save a group of records to the user's favorites.
public
saveBulk(array<string|int, mixed> $params, UserEntityInterface $user) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
Array with some or all of these keys:
- ids - Array of IDs in source|id format
- mytags - Unparsed tag string to associate with record (optional)
- list - ID of list to save record into (omit to create new list)
- $user : UserEntityInterface
-
The user saving the record
Tags
Return values
array<string|int, mixed> —list information