You are here

public function Cron::__construct in Commerce Core 8.2

Constructs a new Cron object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Queue\QueueFactory $queue_factory: The queue factory.

File

modules/cart/src/Cron.php, line 48

Class

Cron
Default cron implementation.

Namespace

Drupal\commerce_cart

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, QueueFactory $queue_factory) {
  $this->orderStorage = $entity_type_manager
    ->getStorage('commerce_order');
  $this->orderTypeStorage = $entity_type_manager
    ->getStorage('commerce_order_type');
  $this->queue = $queue_factory
    ->get('commerce_cart_expiration');
}