You are here

public function CronExampleForm::__construct in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/cron_example/src/Form/CronExampleForm.php \Drupal\cron_example\Form\CronExampleForm::__construct()

Constructs a \Drupal\system\ConfigFormBase object.

Parameters

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

Overrides ConfigFormBase::__construct

File

cron_example/src/Form/CronExampleForm.php, line 50

Class

CronExampleForm
Form with examples on how to use cron.

Namespace

Drupal\cron_example\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, AccountInterface $current_user, CronInterface $cron, QueueFactory $queue, StateInterface $state) {
  parent::__construct($config_factory);
  $this->currentUser = $current_user;
  $this->cron = $cron;
  $this->queue = $queue;
  $this->state = $state;
}