class CLike


Located at : UKNOWVA_ROOT/components/com_community/libraries/like.php

Methods

addLike($element, $itemId)

No description

addDislike($element, $itemId)

No description

unlike($element, $itemId)

No description

userLiked($element, $itemId, $userId)

No description

bool
canLike()

Can current $my user 'like' an item ? - rule: friend can like friend's item (photos/vidoes/event)

getLikeCount($element, $itemId)

Return number of likes

getWhoLikes($element, $itemId)

Return an array of user who likes the element

bool
enabled($element)

No description

string
getHTML($element, $itemId, $userId, $disable_dislike = false)

No description

string
getHtmlPublic($element, $itemId)

Display like/dislike for public

Details

at line 15
addLike($element, $itemId)

Parameters

$element
$itemId

at line 45
addDislike($element, $itemId)

Parameters

$element
$itemId

at line 74
unlike($element, $itemId)

Parameters

$element
$itemId

at line 113
userLiked($element, $itemId, $userId)

Parameters

$element
$itemId
$userId

at line 145
bool canLike()

Can current $my user 'like' an item ? - rule: friend can like friend's item (photos/vidoes/event)

Return Value

bool

at line 155
getLikeCount($element, $itemId)

Return number of likes

Parameters

$element
$itemId

at line 174
CUser getWhoLikes($element, $itemId)

Return an array of user who likes the element

Parameters

$element
$itemId

Return Value

CUser objects

at line 200
bool enabled($element)

Parameters

$element

Return Value

bool True if element can be liked

at line 217
string getHTML($element, $itemId, $userId, $disable_dislike = false)

Parameters

$element
$itemId
$userId
$disable_dislike

Return Value

string

at line 275
string getHtmlPublic($element, $itemId)

Display like/dislike for public

Parameters

$element
$itemId

Return Value

string