PHP Class RTMediaLikeNotification, rtMedia

Author: Jignesh Nakrani ([email protected])
Inheritance: extends RTMediaNotification
Mostrar archivo Open project: rtCamp/rtMedia

Public Properties

Property Type Description
$component_action
$component_id

Public Methods

Method Description
__construct ( )
add_like_notify ( RTMediaLike $likeargs ) add notification using bp_notifications_add_notification function delete and merge likes if already same notification exist on a media
fetch_media_like_stats ( integer $media_id ) : integer Get like count of a media
format_like_notifications ( array $params ) : string/array Format string and media url for notification
init ( ) Hooked to bp_init.

Method Details

__construct() public method

public __construct ( )

add_like_notify() public method

add notification using bp_notifications_add_notification function delete and merge likes if already same notification exist on a media
public add_like_notify ( RTMediaLike $likeargs )
$likeargs RTMediaLike RTMediaLike class object

fetch_media_like_stats() public method

Get like count of a media
public fetch_media_like_stats ( integer $media_id ) : integer
$media_id integer MediaID to count likes
return integer Total like count on success or false

format_like_notifications() public method

Format string and media url for notification
public format_like_notifications ( array $params ) : string/array
$params array array ('action', 'post_id', 'initiator_id', 'total_items', 'format' )
return string/array

init() public method

Hooked to bp_init.
public init ( )

Property Details

$component_action public_oe property

public $component_action

$component_id public_oe property

public $component_id