public function RateWidgetBase::__construct in Rate 8.2
Constructs a new class instance.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.
\Drupal\votingapi\VoteResultFunctionManager $vote_result: Vote result function service.
\Drupal\Core\Entity\EntityFormBuilderInterface $form_builder: The form builder service.
\Drupal\Core\Session\AccountInterface $account: The account service.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\rate\RateBotDetector $bot_detector: The bot detector service.
Overrides PluginBase::__construct
File
- src/
Plugin/ RateWidgetBase.php, line 97
Class
- RateWidgetBase
- Base class for Rate widget plugins.
Namespace
Drupal\rate\PluginCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, VoteResultFunctionManager $vote_result, EntityFormBuilderInterface $form_builder, AccountInterface $account, RequestStack $request_stack, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, RateBotDetector $bot_detector) {
$this->entityTypeManager = $entity_type_manager;
$this->votingapiResult = $vote_result;
$this->entityFormBuilder = $form_builder;
$this->account = $account;
$this->requestStack = $request_stack;
$this->configFactory = $config_factory;
$this->moduleHandler = $module_handler;
$this->botDetector = $bot_detector;
}