-
Notifications
You must be signed in to change notification settings - Fork 9
API Documentation
SalmonDE edited this page Jun 13, 2017
·
4 revisions
As of commit e547488 TopVoter provides an API that allows other plugins to access it's data and edit it.
All examples assume that $topVoter is instanceof \SalmonDE\TopVoter\TopVoter
Getting the list of voters:
$topVoter->getVoters();
Setting voters on the list:
$topVoter->setVoters($value);
Updating and resending the particles:
$topVoter->updateParticle();
$topVoter->sendParticle();
Using this piece of code, you can see what text will be shown on the particle. $topVoter->updateParticle()
will return it to you:
$text = $topVoter->updateParticle();
echo $text;