function AccountSettingsForm::__construct

Same name and namespace in other branches
  1. 11.x core/modules/user/src/AccountSettingsForm.php \Drupal\user\AccountSettingsForm::__construct()
  2. 10 core/modules/user/src/AccountSettingsForm.php \Drupal\user\AccountSettingsForm::__construct()
  3. 9 core/modules/user/src/AccountSettingsForm.php \Drupal\user\AccountSettingsForm::__construct()
  4. 8.9.x core/modules/user/src/AccountSettingsForm.php \Drupal\user\AccountSettingsForm::__construct()

Constructs a \Drupal\user\AccountSettingsForm object.

Parameters

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

\Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager: The typed config manager.

\Drupal\user\RoleStorageInterface|\Drupal\Core\Extension\ModuleHandlerInterface $role_storage: The role storage.

Overrides ConfigFormBase::__construct

File

core/modules/user/src/AccountSettingsForm.php, line 45

Class

AccountSettingsForm
Configure user settings for this site.

Namespace

Drupal\user

Code

public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typedConfigManager, RoleStorageInterface|ModuleHandlerInterface $role_storage) {
  parent::__construct($config_factory, $typedConfigManager);
  $this->roleStorage = $role_storage;
  if ($role_storage instanceof ModuleHandlerInterface) {
    $this->moduleHandler = $role_storage;
    $this->roleStorage = func_get_arg(3);
    @trigger_error('Calling ' . __METHOD__ . '() with the $module_handler argument is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. See https://www.drupal.org/node/3566911', E_USER_DEPRECATED);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.