function SiteConfigureForm::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php \Drupal\Core\Installer\Form\SiteConfigureForm::__construct()
- 8.9.x core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php \Drupal\Core\Installer\Form\SiteConfigureForm::__construct()
- 11.x core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php \Drupal\Core\Installer\Form\SiteConfigureForm::__construct()
Constructs a new SiteConfigureForm.
Parameters
string $root: The app root.
string $site_path: The site path.
\Drupal\Core\Entity\EntityTypeManagerInterface|\Drupal\user\UserStorageInterface $entityTypeManager: The entity type manager.
\Drupal\Core\Extension\ModuleInstallerInterface $module_installer: The module installer.
\Drupal\Core\Locale\CountryManagerInterface|\Drupal\user\UserNameValidator $userNameValidator: The user validator.
bool|null $superUserAccessPolicy: The value of the 'security.enable_super_user' container parameter.
Overrides ConfigFormBase::__construct
File
-
core/
lib/ Drupal/ Core/ Installer/ Form/ SiteConfigureForm.php, line 80
Class
- SiteConfigureForm
- Provides the site configuration form.
Namespace
Drupal\Core\Installer\FormCode
public function __construct($root, $site_path, EntityTypeManagerInterface|UserStorageInterface $entityTypeManager, ModuleInstallerInterface $module_installer, CountryManagerInterface|UserNameValidator $userNameValidator, ?bool $superUserAccessPolicy = NULL) {
$this->root = $root;
$this->sitePath = $site_path;
if ($this->entityTypeManager instanceof UserStorageInterface) {
@trigger_error('Calling ' . __METHOD__ . '() with the $entityTypeManager argument as UserStorageInterface is deprecated in drupal:10.3.0 and must be EntityTypeManagerInterface in drupal:11.0.0. See https://www.drupal.org/node/3443172', E_USER_DEPRECATED);
$this->entityTypeManager = \Drupal::entityTypeManager();
}
$this->userStorage = $this->entityTypeManager
->getStorage('user');
$this->moduleInstaller = $module_installer;
if ($userNameValidator instanceof CountryManagerInterface) {
@trigger_error('Calling ' . __METHOD__ . '() with the $userNameValidator argument as CountryManagerInterface is deprecated in drupal:10.3.0 and must be UserNameValidator in drupal:11.0.0. See https://www.drupal.org/node/3431205', E_USER_DEPRECATED);
$this->userNameValidator = \Drupal::service('user.name_validator');
}
if ($this->superUserAccessPolicy === NULL) {
@trigger_error('Calling ' . __METHOD__ . '() without the $superUserAccessPolicy argument is deprecated in drupal:10.3.0 and must be passed in drupal:11.0.0. See https://www.drupal.org/node/3443172', E_USER_DEPRECATED);
$this->superUserAccessPolicy = \Drupal::getContainer()->getParameter('security.enable_super_user') ?? TRUE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.