LikesTrait
+ Inheritance diagram for LikesTrait:

Description

The resource can be "liked".

Public Methods

magic Like[] getLikes ()
 
magic int getNumLikes ()
 
magic bool hasLikes ()
 
magic bool isLiked ()
 Whether you like this. More...
 
magic Like[] selectLikes (callable $filter)
 fn( Like $like ): bool More...
 
magic $this setLiked (bool $liked)
 Sets whether you like this. More...
 

Methods

◆ getLikes()

magic Like [] getLikes ( )
Returns
Like[]

◆ getNumLikes()

magic int getNumLikes ( )
Returns
int

Reimplemented in Story.

◆ hasLikes()

magic bool hasLikes ( )
Returns
bool

◆ isLiked()

magic bool isLiked ( )

Whether you like this.

Returns
bool

◆ selectLikes()

magic Like [] selectLikes ( callable  $filter)

fn( Like $like ): bool

Returns
Like[]

◆ setLiked()

magic $this setLiked ( bool  $liked)

Sets whether you like this.

Returns
$this