public function EventTrackerService::__construct in Commerce Google Tag Manager 8.2
Same name and namespace in other branches
- 8 src/EventTrackerService.php \Drupal\commerce_google_tag_manager\EventTrackerService::__construct()
Constructs the EventTrackerService service.
Parameters
\Drupal\commerce_google_tag_manager\EventStorageService $event_storage: The Commerce GTM event storage.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.
\Drupal\commerce_store\CurrentStoreInterface $current_store: The current store.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Drupal\commerce_order\PriceCalculatorInterface $price_calculator: The price calculator.
File
- src/
EventTrackerService.php, line 84
Class
- EventTrackerService
- Track different events from Google's Enhanced Ecommerce.
Namespace
Drupal\commerce_google_tag_managerCode
public function __construct(EventStorageService $event_storage, EventDispatcherInterface $event_dispatcher, CurrentStoreInterface $current_store, AccountInterface $current_user, PriceCalculatorInterface $price_calculator) {
$this->eventDispatcher = $event_dispatcher;
$this->eventStorage = $event_storage;
$this->currentStore = $current_store;
$this->currentUser = $current_user;
$this->priceCalculator = $price_calculator;
}