You are here

public function Zebra::calculateResult in Voting API 8.3

Performs the calculations on a set of votes to derive the result.

Parameters

\Drupal\votingapi\Entity\Vote[] $votes: An array of Vote entities.

Return value

int A result based on the supplied votes.

Overrides VoteResultFunctionInterface::calculateResult

File

tests/modules/votingapi_test/src/Plugin/VoteResultFunction/Zebra.php, line 21

Class

Zebra
A test plugin for the Voting API module.

Namespace

Drupal\votingapi_test\Plugin\VoteResultFunction

Code

public function calculateResult($votes) {
  return 10101;
}