You are here

public function VoteController::__construct in Rate 8

Constructs a Vote Controller.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tags_invalidator: The cache tags invalidator.

\Drupal\Core\Render\RendererInterface $renderer: The renderer service.

\Drupal\rate\RateVote $rate_vote: The bot detector service.

\Drupal\rate\RateEntityVoteWidget $vote_widget: The vote widget to display.

File

src/Controller/VoteController.php, line 82

Class

VoteController
Returns responses for Rate routes.

Namespace

Drupal\rate\Controller

Code

public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, CacheTagsInvalidatorInterface $cache_tags_invalidator, RendererInterface $renderer, RateVote $rate_vote, RateEntityVoteWidget $vote_widget) {
  $this->config = $config_factory
    ->get('rate.settings');
  $this->entityTypeManager = $entity_type_manager;
  $this->cacheTagsInvalidator = $cache_tags_invalidator;
  $this->renderer = $renderer;
  $this->rateVote = $rate_vote;
  $this->voteWidget = $vote_widget;
}