MetaFox

CommentItemRelated extends JsonResource
in package
Uses HasStatistic, HasCommentExtraTrait, IsLikedTrait, UserReactedTrait

Class CommentItem.

Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Table of Contents

Properties

$resource  : Comment

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

Methods

toArray()

Transform the resource collection into an array.

public toArray(Request $request) : array<string, mixed>
Parameters
$request : Request
Tags
throws
AuthenticationException
Return values
array<string, mixed>

userMostReactions()

public userMostReactions(User $context[, Entity|null $content = null ][, string|null $typeId = null ]) : mixed
Parameters
$context : User
$content : Entity|null = null
$typeId : string|null = null

userReacted()

public userReacted(User $context[, Entity|null $content = null ][, string|null $typeId = null ]) : mixed
Parameters
$context : User
$content : Entity|null = null
$typeId : string|null = null

getExtra()

protected getExtra() : array<string|int, mixed>
Tags
throws
AuthenticationException
Return values
array<string|int, mixed>

getRoleLabelInOwner()

protected getRoleLabelInOwner(User|null $user, User|null $owner) : string|null
Parameters
$user : User|null
$owner : User|null
Return values
string|null

getStatistic()

protected getStatistic() : array<string, mixed>
Return values
array<string, mixed>

        
On this page

Search results