public function NoProfilesException::__construct

public NoProfilesException::__construct(TranslationInterface $string_translation)

Constructs a new "no profiles available" exception.

Parameters

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation manager.

Overrides InstallerException::__construct

File

core/lib/Drupal/Core/Installer/Exception/NoProfilesException.php, line 18

Class

NoProfilesException
Exception thrown if no installation profiles are available.

Namespace

Drupal\Core\Installer\Exception

Code

public function __construct(TranslationInterface $string_translation) {
  $this->stringTranslation = $string_translation;

  $title = $this->t('No profiles available');
  $message = $this->t('We were unable to find any installation profiles. Installation profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.');
  parent::__construct($message, $title);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Installer!Exception!NoProfilesException.php/function/NoProfilesException::__construct/8.1.x