You are here

public function EventStorageService::__construct in Commerce Google Tag Manager 8.2

Same name and namespace in other branches
  1. 8 src/EventStorageService.php \Drupal\commerce_google_tag_manager\EventStorageService::__construct()

Constructs the EventTrackerService service.

Parameters

\Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory: The tempstore factory.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

File

src/EventStorageService.php, line 37

Class

EventStorageService
Stores all tracked Enhanced Ecommerce events in a private tempstore.

Namespace

Drupal\commerce_google_tag_manager

Code

public function __construct(PrivateTempStoreFactory $temp_store_factory, EventDispatcherInterface $event_dispatcher) {
  $this->tempStore = $temp_store_factory
    ->get('commerce_google_tag_manager');
  $this->eventDispatcher = $event_dispatcher;
}