You are here

public function RateEntityVoteWidget::__construct in Rate 8

Constructs a RateEntityVoteWidget object.

Parameters

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

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

\Drupal\Core\Session\AccountProxyInterface $account_proxy: The account proxy.

\Drupal\votingapi\VoteResultFunctionManager $result_manager: The vote result manager.

File

src/RateEntityVoteWidget.php, line 56

Class

RateEntityVoteWidget
The rate.entity.vote_widget service.

Namespace

Drupal\rate

Code

public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, AccountProxyInterface $account_proxy, VoteResultFunctionManager $result_manager) {
  $this->config = $config_factory
    ->get('rate.settings');
  $this->entityTypeManager = $entity_type_manager;
  $this->accountProxy = $account_proxy;
  $this->resultManager = $result_manager;
}