function QueueExampleForm::__construct
Same name in other branches
- 3.x modules/queue_example/src/Form/QueueExampleForm.php \Drupal\queue_example\Form\QueueExampleForm::__construct()
- 8.x-1.x queue_example/src/Forms/QueueExampleForm.php \Drupal\queue_example\Forms\QueueExampleForm::__construct()
Constructs a new \Drupal\queue_example\Form\QueueExampleForm object.
Parameters
\Drupal\Core\Queue\QueueFactory $queue_factory: The queue factory.
\Drupal\Core\Database\Connection $database: The database connection.
\Drupal\Core\CronInterface $cron: The cron service.
\Drupal\Core\Site\Settings $settings: The site settings.
File
-
modules/
queue_example/ src/ Form/ QueueExampleForm.php, line 61
Class
- QueueExampleForm
- Form with examples on how to use queue.
Namespace
Drupal\queue_example\FormCode
public function __construct(QueueFactory $queue_factory, Connection $database, CronInterface $cron, Settings $settings) {
$this->queueFactory = $queue_factory;
$this->queueType = $settings->get('queue_default', 'queue.database');
$this->database = $database;
$this->cron = $cron;
}