Abstract handling for the content-specific aspects of liking content.

package XenForo_Like

 Methods

Gets data for specified content IDs.

getContentData(array $contentIds, array $viewingUser) : array

This must check viewing permissions!

Parameters

$contentIds

array

$viewingUser

array

Returns

arrayKeyed by content ID

Gets the name of the template that will be used when listing likes of this type.

getListTemplateName() : string

Returns

stringnews_feed_item_{$contentType}_like

Increments the like counter for a particular piece of content.

incrementLikeCounter(integer $contentId, array $latestLikes, integer $adjustAmount) 

Parameters

$contentId

integer

$latestLikes

array

A list of the latest likes this content has received.

$adjustAmount

integer

Adjusts the number of likes by this amount