interface PollVoteStorageInterface in Poll 8
Defines a common interface for poll vote controller classes.
Hierarchy
- interface \Drupal\poll\PollVoteStorageInterface
Expanded class hierarchy of PollVoteStorageInterface
All classes that implement PollVoteStorageInterface
File
- src/
PollVoteStorageInterface.php, line 10
Namespace
Drupal\pollView source
interface PollVoteStorageInterface {
/**
* Delete a user's votes for a poll choice.
*
* @param array $choices
* A list of choice ID's for each one we will remove all the votes.
*/
public function deleteChoicesVotes(array $choices);
/**
* Delete a user's votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*/
public function deleteVotes(PollInterface $poll);
/**
* Cancel a user's vote.
*
* @param PollInterface $poll
* @param AccountInterface $account
*/
public function cancelVote(PollInterface $poll, AccountInterface $account = NULL);
/**
* Save a user's vote.
*
* @param array $options
*/
public function saveVote(array $options);
/**
* Get all votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*/
public function getVotes(PollInterface $poll);
/**
* Get a user's votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*/
public function getUserVote(PollInterface $poll);
/**
* Get total votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*/
public function getTotalVotes(PollInterface $poll);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PollVoteStorageInterface:: |
public | function | Cancel a user's vote. | 1 |
PollVoteStorageInterface:: |
public | function | Delete a user's votes for a poll choice. | 1 |
PollVoteStorageInterface:: |
public | function | Delete a user's votes for a poll. | 1 |
PollVoteStorageInterface:: |
public | function | Get total votes for a poll. | 1 |
PollVoteStorageInterface:: |
public | function | Get a user's votes for a poll. | 1 |
PollVoteStorageInterface:: |
public | function | Get all votes for a poll. | 1 |
PollVoteStorageInterface:: |
public | function | Save a user's vote. | 1 |