You are here

public function VotingApiReactionManager::allReactions in Voting API Reaction 8

Return all vote types marked as reaction.

Return value

array Active reaction vote types.

1 call to VotingApiReactionManager::allReactions()
VotingApiReactionManager::getReactions in src/VotingApiReactionManager.php
Return rendered list of active reactions.

File

src/VotingApiReactionManager.php, line 191

Class

VotingApiReactionManager
Manages reactions through Voting API entities.

Namespace

Drupal\votingapi_reaction

Code

public function allReactions() {
  return array_filter($this->voteTypeStorage
    ->loadMultiple(), function (VoteType $entity) {
    return $entity
      ->getThirdPartySetting('votingapi_reaction', 'reaction');
  });
}