You are here

public function DefaultCommandSubscriber::__construct in Googalytics - Google Analytics 8

DefaultCommandSubscriber constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The config factory service.

\Drupal\ga\CommandRegistryService $commandRegistry: The command registry service.

\Drupal\Core\Session\AccountInterface $currentUser: The current user service.

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

File

src/EventSubscriber/DefaultCommandSubscriber.php, line 75

Class

DefaultCommandSubscriber
Class DefaultCommandSubscriber.

Namespace

Drupal\ga\EventSubscriber

Code

public function __construct(ConfigFactoryInterface $configFactory, CommandRegistryService $commandRegistry, AccountInterface $currentUser, EntityTypeManagerInterface $entityTypeManager) {
  $this->configFactory = $configFactory;
  $this->commandRegistry = $commandRegistry;
  $this->currentUser = $currentUser;
  $this->userStorage = $entityTypeManager
    ->getStorage('user');
}