SavedRepositoryInterface
in
Interface SavedRepositoryInterface.
Tags
Table of Contents
Methods
- addToList() : Saved
- checkIsSaved() : bool
- createSaved() : Saved
- deleteForItem() : void
- deleteForUser() : void
- deleteSaved() : bool
- findSavedItem() : Saved|null
- getAvailableTypes() : array<string|int, mixed>
- getCollectionByItem() : Saved
- getFilterOptions() : array<string|int, mixed>
- isAddedToList() : bool
- markAsOpened() : Saved
- markAsUnOpened() : Saved
- removeCollectionItem() : mixed
- unSave() : bool
- updateSaved() : Saved
- viewSavedItem() : Saved
- viewSavedItems() : Paginator
Methods
addToList()
public
addToList(User $context, int $itemId, array<string|int, mixed> $listIds) : Saved
Parameters
- $context : User
- $itemId : int
- $listIds : array<string|int, mixed>
Return values
SavedcheckIsSaved()
public
checkIsSaved(int $userId, int $itemId, string $itemType) : bool
Parameters
- $userId : int
- $itemId : int
- $itemType : string
Return values
boolcreateSaved()
public
createSaved(User $context, array<string, mixed> $attributes) : Saved
Parameters
- $context : User
- $attributes : array<string, mixed>
Tags
Return values
SaveddeleteForItem()
public
deleteForItem(HasSavedItem $item) : void
Parameters
- $item : HasSavedItem
deleteForUser()
public
deleteForUser(User $user) : void
Parameters
- $user : User
deleteSaved()
public
deleteSaved(User $context, int $id) : bool
Parameters
- $context : User
- $id : int
Tags
Return values
boolfindSavedItem()
public
findSavedItem(User $context, array<string, mixed> $attributes) : Saved|null
Parameters
- $context : User
- $attributes : array<string, mixed>
Return values
Saved|nullgetAvailableTypes()
public
getAvailableTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>getCollectionByItem()
public
getCollectionByItem(int $itemId) : Saved
Parameters
- $itemId : int
Return values
SavedgetFilterOptions()
public
getFilterOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>isAddedToList()
public
isAddedToList(Saved $item, int $listId) : bool
Parameters
- $item : Saved
- $listId : int
Return values
boolmarkAsOpened()
public
markAsOpened(User $context, int $itemId) : Saved
Parameters
- $context : User
- $itemId : int
Return values
SavedmarkAsUnOpened()
public
markAsUnOpened(User $context, int $itemId) : Saved
Parameters
- $context : User
- $itemId : int
Return values
SavedremoveCollectionItem()
public
removeCollectionItem(User $context, array<string|int, mixed> $attributes) : mixed
Parameters
- $context : User
- $attributes : array<string|int, mixed>
unSave()
public
unSave(User $context, array<string|int, mixed> $attribute) : bool
Parameters
- $context : User
- $attribute : array<string|int, mixed>
Tags
Return values
boolupdateSaved()
public
updateSaved(User $context, int $id, array<string, mixed> $attributes) : Saved
Parameters
- $context : User
- $id : int
- $attributes : array<string, mixed>
Tags
Return values
SavedviewSavedItem()
public
viewSavedItem(User $context, int $id) : Saved
Parameters
- $context : User
- $id : int
Tags
Return values
SavedviewSavedItems()
public
viewSavedItems(User $context, array<string, mixed> $attribute) : Paginator
Parameters
- $context : User
- $attribute : array<string, mixed>