You are here

public function GoogleAnalyticsAdminSettingsForm::__construct in Google Analytics 4.x

Same name and namespace in other branches
  1. 8.3 src/Form/GoogleAnalyticsAdminSettingsForm.php \Drupal\google_analytics\Form\GoogleAnalyticsAdminSettingsForm::__construct()
  2. 8.2 src/Form/GoogleAnalyticsAdminSettingsForm.php \Drupal\google_analytics\Form\GoogleAnalyticsAdminSettingsForm::__construct()

The constructor method.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The manages modules.

\Drupal\google_analytics\Helpers\GoogleAnalyticsAccounts $google_analytics_accounts: The google analytics accounts manager.

Overrides ConfigFormBase::__construct

File

src/Form/GoogleAnalyticsAdminSettingsForm.php, line 61

Class

GoogleAnalyticsAdminSettingsForm
Configure Google_Analytics settings for this site.

Namespace

Drupal\google_analytics\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, AccountInterface $current_user, ModuleHandlerInterface $module_handler, GoogleAnalyticsAccounts $google_analytics_accounts, JavascriptLocalCache $google_analytics_javascript) {
  parent::__construct($config_factory);
  $this->currentUser = $current_user;
  $this->moduleHandler = $module_handler;
  $this->gaAccounts = $google_analytics_accounts;
  $this->gaJavascript = $google_analytics_javascript;
}