UAP 3 Documentation - Sweets

Welcome to UAP Docs - Sweets

Sweets Helper

The Sweets Helper allows users to Sweet(Like) content.

This helper can be used in Views.

use Helpers\Sweets;

// Display total sweets (used outside of sweeted page)
echo Sweets::getTotalSweets($data['item_id'], 'Items', 'Items_All');

// Setup Location of Sweet
$sweet_url = "Items/".$data['item_id'];

// Display Sweet Button
echo Sweets::displaySweetsButton($data['item_id'], 'Items', $data['current_userID'], "0", $sweet_url);

// Display Sweets
echo Sweets::getSweets($data['item_id'], 'Forum_Topic');

- Can't find what your looking for? Please use Forum.