CommentItemRelated
extends JsonResource
in package
Uses
HasStatistic, HasCommentExtraTrait, IsLikedTrait, UserReactedTrait
Class CommentItem.
Tags
Table of Contents
Properties
Methods
- isLike() : bool
- toArray() : array<string, mixed>
- Transform the resource collection into an array.
- userMostReactions() : mixed
- userReacted() : mixed
- getExtra() : array<string|int, mixed>
- getRoleLabelInOwner() : string|null
- getStatistic() : array<string, mixed>
Properties
$resource
public
Comment
$resource
Methods
isLike()
public
isLike(User $context[, Entity|null $content = null ]) : bool
Parameters
Return values
booltoArray()
Transform the resource collection into an array.
public
toArray(Request $request) : array<string, mixed>
Parameters
- $request : Request
Tags
Return values
array<string, mixed>userMostReactions()
public
userMostReactions(User $context[, Entity|null $content = null ][, string|null $typeId = null ]) : mixed
Parameters
userReacted()
public
userReacted(User $context[, Entity|null $content = null ][, string|null $typeId = null ]) : mixed
Parameters
getExtra()
protected
getExtra() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getRoleLabelInOwner()
protected
getRoleLabelInOwner(User|null $user, User|null $owner) : string|null
Parameters
Return values
string|nullgetStatistic()
protected
getStatistic() : array<string, mixed>