You are here

public function CartEventSubscriber::__construct in Commerce Core 8.2

Same name in this branch
  1. 8.2 modules/log/src/EventSubscriber/CartEventSubscriber.php \Drupal\commerce_log\EventSubscriber\CartEventSubscriber::__construct()
  2. 8.2 modules/cart/src/EventSubscriber/CartEventSubscriber.php \Drupal\commerce_cart\EventSubscriber\CartEventSubscriber::__construct()

Constructs a new CartEventSubscriber object.

Parameters

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

File

modules/log/src/EventSubscriber/CartEventSubscriber.php, line 26

Class

CartEventSubscriber

Namespace

Drupal\commerce_log\EventSubscriber

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager) {
  $this->logStorage = $entity_type_manager
    ->getStorage('commerce_log');
}