public function VoteResultManager::getDefaultResults in Fivestar 8
Return default result collection.
Return value
array An associative array with keys:
- vote_sum: The sum of all votes.
- vote_user: The user's vote.
- vote_count: The number of votes.
- vote_average: The average of all votes.
2 calls to VoteResultManager::getDefaultResults()
- VoteResultManager::getResults in src/
VoteResultManager.php - Get all votes results for passed entity.
- VoteResultManager::getResultsByVoteType in src/
VoteResultManager.php - Get votes for passed entity based on vote type.
File
- src/
VoteResultManager.php, line 73
Class
- VoteResultManager
- Contains methods for managing vote results.
Namespace
Drupal\fivestarCode
public function getDefaultResults() {
return [
'vote_sum' => 0,
'vote_user' => 0,
'vote_count' => 0,
'vote_average' => 0,
];
}