public function InstallProfileMismatchException::__construct in Drupal 8
Constructs a new InstallProfileMismatchException exception.
Parameters
string $selected_profile: The profile selected by _install_select_profile().
string $settings_profile: The profile in settings.php.
string $settings_file: The path to settings.php.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation manager.
Overrides InstallerException::__construct
Deprecated
in drupal:8.3.0 and is removed from drupal:9.0.0. The install profile is written to core.extension.
See also
install_write_profile
File
- core/
lib/ Drupal/ Core/ Installer/ Exception/ InstallProfileMismatchException.php, line 32
Class
- InstallProfileMismatchException
- Exception thrown if settings.php cannot be written and the chosen profile does not match.
Namespace
Drupal\Core\Installer\ExceptionCode
public function __construct($selected_profile, $settings_profile, $settings_file, TranslationInterface $string_translation) {
$this->stringTranslation = $string_translation;
$title = $this
->t('Install profile mismatch');
$message = $this
->t('The selected profile %profile does not match the install_profile setting, which is %settings_profile. Cannot write updated setting to %settings_file.', [
'%profile' => $selected_profile,
'%settings_profile' => $settings_profile,
'%settings_file' => $settings_file,
]);
parent::__construct($message, $title);
}