You are here

public function GoogleAnalyticsAdminSettingsForm::__construct in Google Analytics 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/GoogleAnalyticsAdminSettingsForm.php \Drupal\google_analytics\Form\GoogleAnalyticsAdminSettingsForm::__construct()
  2. 4.x 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 $currentUser: The current user.

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

Overrides ConfigFormBase::__construct

File

src/Form/GoogleAnalyticsAdminSettingsForm.php, line 43

Class

GoogleAnalyticsAdminSettingsForm
Configure Google_Analytics settings for this site.

Namespace

Drupal\google_analytics\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, AccountInterface $currentUser, ModuleHandlerInterface $moduleHandler) {
  parent::__construct($config_factory);
  $this->currentUser = $currentUser;
  $this->moduleHandler = $moduleHandler;
}