You are here

public function GoogleAnalyticsCounterCustomFieldGenerator::__construct in Google Analytics Counter 8.3

Constructs a GoogleAnalyticsCounterCustomFieldGenerator object.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

\Drupal\Core\Database\Connection $connection: A database connection.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

File

src/GoogleAnalyticsCounterCustomFieldGenerator.php, line 73

Class

GoogleAnalyticsCounterCustomFieldGenerator
Defines the Google Analytics Counter custom field generator.

Namespace

Drupal\google_analytics_counter

Code

public function __construct(ConfigFactoryInterface $config_factory, Connection $connection, LoggerInterface $logger, MessengerInterface $messenger) {
  $this->config = $config_factory
    ->get('google_analytics_counter.settings');
  $this->connection = $connection;
  $this->logger = $logger;
  $this->messenger = $messenger;
}