CommentDetail
extends JsonResource
in package
Uses
HasStatistic, HasCommentExtraTrait, IsLikedTrait, UserReactedTrait, HasTransformContent
Class CommentDetail.
Tags
Table of Contents
Properties
- $resource : Comment
- $isPreview : bool
Methods
- getTransformContent() : string|null
- isLike() : bool
- setIsPreview() : self
- 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
$isPreview
protected
bool
$isPreview
= false
Methods
getTransformContent()
public
getTransformContent([bool $parseUserFullLink = false ]) : string|null
Parameters
- $parseUserFullLink : bool = false
Return values
string|nullisLike()
public
isLike(User $context[, Entity|null $content = null ]) : bool
Parameters
Return values
boolsetIsPreview()
public
setIsPreview(string $isPreview) : self
Parameters
- $isPreview : string
Return values
selftoArray()
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>