You are here

public function PollStorage::getTotalVotes in Poll 8

Get total votes for a poll.

Parameters

PollInterface $poll:

Return value

mixed

Overrides PollStorageInterface::getTotalVotes

Deprecated

in Drupal 8.x-1.0. Use \Drupal\poll\PollVoteStorageInterface::getTotalVotes() instead.

See also

\Drupal\poll\PollVoteStorageInterface::getTotalVotes()

File

src/PollStorage.php, line 19

Class

PollStorage
Controller class for polls.

Namespace

Drupal\poll

Code

public function getTotalVotes(PollInterface $poll) {
  return \Drupal::service('poll_vote.storage')
    ->getTotalVotes($poll);
}