LikeRepositoryInterface
in
Interface Like.
Tags
Table of Contents
Methods
- createLike() : array<string, mixed>
- deleteByUser() : bool
- deleteByUserAndItem() : array<string, mixed>
- deleteLikeById() : bool
- getLike() : Like|null
- getMostReactions() : Collection
- isLiked() : bool
- viewLikes() : Paginator
- viewLikeTabs() : array<int, mixed>
Methods
createLike()
public
createLike(User $context, int $itemId, string $itemType, int $reactionId) : array<string, mixed>
Parameters
- $context : User
- $itemId : int
- $itemType : string
- $reactionId : int
Tags
Return values
array<string, mixed>deleteByUser()
public
deleteByUser(User $context) : bool
Parameters
- $context : User
Return values
booldeleteByUserAndItem()
public
deleteByUserAndItem(User $context, int $itemId, string $itemType) : array<string, mixed>
Parameters
- $context : User
- $itemId : int
- $itemType : string
Tags
Return values
array<string, mixed>deleteLikeById()
public
deleteLikeById(User $context, int $id) : bool
Parameters
- $context : User
- $id : int
Tags
Return values
boolgetLike()
public
getLike(User $context, HasTotalLike $content) : Like|null
Parameters
- $context : User
- $content : HasTotalLike
Return values
Like|nullgetMostReactions()
public
getMostReactions(User $context, HasTotalLike $content[, int $limit = 3 ]) : Collection
Parameters
- $context : User
- $content : HasTotalLike
- $limit : int = 3
Return values
CollectionisLiked()
public
isLiked(User $context, HasTotalLike $content) : bool
Parameters
- $context : User
- $content : HasTotalLike
Return values
boolviewLikes()
public
viewLikes(User $context, array<string, mixed> $attributes) : Paginator
Parameters
- $context : User
- $attributes : array<string, mixed>
Tags
Return values
PaginatorviewLikeTabs()
public
viewLikeTabs(User $context, int $itemId, string $itemType) : array<int, mixed>
Parameters
- $context : User
- $itemId : int
- $itemType : string