interface PollStorageInterface in Poll 8
Defines a common interface for poll entity controller classes.
Hierarchy
- interface \Drupal\Core\Entity\EntityStorageInterface
- interface \Drupal\poll\PollStorageInterface
Expanded class hierarchy of PollStorageInterface
All classes that implement PollStorageInterface
File
- src/
PollStorageInterface.php, line 11
Namespace
Drupal\pollView source
interface PollStorageInterface extends EntityStorageInterface {
/**
* Save a user's vote.
*
* @param array $options
*
* @return mixed
*
* @deprecated in Drupal 8.x-1.0.
* Use \Drupal\poll\PollVoteStorageInterface::saveVote() instead.
*
* @see \Drupal\poll\PollVoteStorageInterface::saveVote()
*/
public function saveVote(array $options);
/**
* Cancel a user's vote.
*
* @param PollInterface $poll
* @param AccountInterface $account
*
* @return mixed
*
* @deprecated in Drupal 8.x-1.0.
* Use \Drupal\poll\PollVoteStorageInterface::cancelVote() instead.
*
* @see \Drupal\poll\PollVoteStorageInterface::cancelVote()
*/
public function cancelVote(PollInterface $poll, AccountInterface $account = NULL);
/**
* Get total votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*
* @deprecated in Drupal 8.x-1.0.
* Use \Drupal\poll\PollVoteStorageInterface::getTotalVotes() instead.
*
* @see \Drupal\poll\PollVoteStorageInterface::getTotalVotes()
*/
public function getTotalVotes(PollInterface $poll);
/**
* Get all votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*
* @deprecated in Drupal 8.x-1.0.
* Use \Drupal\poll\PollVoteStorageInterface::getVotes() instead.
*
* @see \Drupal\poll\PollVoteStorageInterface::getVotes()
*/
public function getVotes(PollInterface $poll);
/**
* Delete a user's votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*
* @deprecated in Drupal 8.x-1.0.
* Use \Drupal\poll\PollVoteStorageInterface::deleteVotes() instead.
*
* @see \Drupal\poll\PollVoteStorageInterface::deleteVotes()
*/
public function deleteVotes(PollInterface $poll);
/**
* Get a user's votes for a poll.
*
* @param PollInterface $poll
*
* @return mixed
*
* @deprecated in Drupal 8.x-1.0.
* Use \Drupal\poll\PollVoteStorageInterface::getUserVote() instead.
*
* @see \Drupal\poll\PollVoteStorageInterface::getUserVote()
*/
public function getUserVote(PollInterface $poll);
/**
* Get the most recent poll posted on the site.
*
* @return mixed
*/
public function getMostRecentPoll();
/**
* Find all duplicates of a poll by matching the question.
*
* @param PollInterface $poll
*
* @return mixed
*/
public function getPollDuplicates(PollInterface $poll);
/**
* Returns all expired polls.
*
* @return \Drupal\poll\PollInterface[]
*
*/
public function getExpiredPolls();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityStorageInterface:: |
public | function | Constructs a new entity object, without permanently saving it. | 1 |
EntityStorageInterface:: |
public | function | Deletes permanently saved entities. | 1 |
EntityStorageInterface:: |
public | function | Delete a specific entity revision. | 4 |
EntityStorageInterface:: |
constant | Load the most recent version of an entity's field data. | ||
EntityStorageInterface:: |
constant | Load the version of an entity's field data specified in the entity. | ||
EntityStorageInterface:: |
public | function | Gets an aggregated query instance. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type definition. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type ID. | 1 |
EntityStorageInterface:: |
public | function | Gets an entity query instance. | 1 |
EntityStorageInterface:: |
public | function | Determines if the storage contains any data. | 1 |
EntityStorageInterface:: |
public | function | Loads one entity. | 1 |
EntityStorageInterface:: |
public | function | Load entities by their property values. | 1 |
EntityStorageInterface:: |
public | function | Loads one or more entities. | 1 |
EntityStorageInterface:: |
public | function | Load a specific entity revision. | 4 |
EntityStorageInterface:: |
public | function | Loads an unchanged entity from the database. | 1 |
EntityStorageInterface:: |
public | function | Resets the internal, static entity cache. | 1 |
EntityStorageInterface:: |
public | function | Restores a previously saved entity. | 1 |
EntityStorageInterface:: |
public | function | Saves the entity permanently. | 1 |
PollStorageInterface:: |
public | function | Cancel a user's vote. | 1 |
PollStorageInterface:: |
public | function | Delete a user's votes for a poll. | 1 |
PollStorageInterface:: |
public | function | Returns all expired polls. | 1 |
PollStorageInterface:: |
public | function | Get the most recent poll posted on the site. | 1 |
PollStorageInterface:: |
public | function | Find all duplicates of a poll by matching the question. | 1 |
PollStorageInterface:: |
public | function | Get total votes for a poll. | 1 |
PollStorageInterface:: |
public | function | Get a user's votes for a poll. | 1 |
PollStorageInterface:: |
public | function | Get all votes for a poll. | 1 |
PollStorageInterface:: |
public | function | Save a user's vote. | 1 |