function CronExampleForm::__construct
Same name in other branches
- 3.x modules/cron_example/src/Form/CronExampleForm.php \Drupal\cron_example\Form\CronExampleForm::__construct()
Constructs new CronExampleForm object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Drupal\Core\CronInterface $cron: The cron service.
\Drupal\Core\Queue\QueueFactory $queue: The queue factory.
\Drupal\Core\State\StateInterface $state: The state keyvalue collection.
\Drupal\Component\Datetime\TimeInterface $time: The time service.
Overrides ConfigFormBase::__construct
File
-
modules/
cron_example/ src/ Form/ CronExampleForm.php, line 71
Class
- CronExampleForm
- Form with examples on how to use cron.
Namespace
Drupal\cron_example\FormCode
public function __construct(ConfigFactoryInterface $config_factory, AccountInterface $current_user, CronInterface $cron, QueueFactory $queue, StateInterface $state, TimeInterface $time) {
parent::__construct($config_factory);
$this->currentUser = $current_user;
$this->cron = $cron;
$this->queue = $queue;
$this->state = $state;
$this->time = $time;
}