public function RateWidgetBaseForm::__construct in Rate 8.2
Constructs a RateWidgetBaseForm object.
Parameters
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.
\Drupal\Component\Datetime\TimeInterface $time: The time service.
\Drupal\votingapi\VoteResultFunctionManager $votingapi_result: Vote result function service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.
\Drupal\Core\Session\AccountInterface $account: The account service.
\Psr\Log\LoggerInterface $logger: A logger instance.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
Overrides ContentEntityForm::__construct
File
- src/
Form/ RateWidgetBaseForm.php, line 87
Class
- RateWidgetBaseForm
- Form controller for rate vote forms.
Namespace
Drupal\rate\FormCode
public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, VoteResultFunctionManager $votingapi_result, EntityTypeManagerInterface $entity_type_manager, AccountInterface $account, LoggerInterface $logger, ConfigFactoryInterface $config_factory) {
parent::__construct($entity_repository, $entity_type_bundle_info, $time);
$this->time = $time;
$this->votingapiResult = $votingapi_result;
$this->entityTypeManager = $entity_type_manager;
$this->account = $account;
$this->logger = $logger;
$this->config = $config_factory
->get('rate.settings');
}