You are here

public function VotingApiReactionManager::__construct in Voting API Reaction 8

Class constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager service.

\Drupal\Core\Session\AccountProxy $currentUser: Current user service.

\Drupal\votingapi\VoteResultFunctionManager $votingApiResults: Voting API results service.

\Drupal\Core\Render\Renderer $renderer: Renderer service.

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Configuration factory service.

File

src/VotingApiReactionManager.php, line 84

Class

VotingApiReactionManager
Manages reactions through Voting API entities.

Namespace

Drupal\votingapi_reaction

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, AccountProxy $currentUser, VoteResultFunctionManager $votingApiResults, Renderer $renderer, ConfigFactoryInterface $configFactory) {
  $this->voteStorage = $entityTypeManager
    ->getStorage('vote');
  $this->voteTypeStorage = $entityTypeManager
    ->getStorage('vote_type');
  $this->fileStorage = $entityTypeManager
    ->getStorage('file');
  $this->currentUser = $currentUser;
  $this->votingApiResults = $votingApiResults;
  $this->renderer = $renderer;
  $this->configFactory = $configFactory;
}