NoProfilesException.php 898 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Drupal\Core\Installer\Exception;
  3. use Drupal\Core\StringTranslation\TranslationInterface;
  4. /**
  5. * Exception thrown if no installation profiles are available.
  6. */
  7. class NoProfilesException extends InstallerException {
  8. /**
  9. * Constructs a new "no profiles available" exception.
  10. *
  11. * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
  12. * The string translation manager.
  13. */
  14. public function __construct(TranslationInterface $string_translation) {
  15. $this->stringTranslation = $string_translation;
  16. $title = $this->t('No profiles available');
  17. $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.');
  18. parent::__construct($message, $title);
  19. }
  20. }