Example #1
0
 /**
  * Constructs a new "no profiles available" exception.
  *
  * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
  *   The string translation manager.
  */
 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);
 }
    /**
     * Constructs a new "already installed" exception.
     *
     * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
     *   The string translation manager.
     */
    public function __construct(TranslationInterface $string_translation)
    {
        $this->stringTranslation = $string_translation;
        $title = $this->t('Drupal already installed');
        $message = $this->t('<ul>
<li>To start over, you must empty your existing database and copy <em>default.settings.php</em> over <em>settings.php</em>.</li>
<li>To upgrade an existing installation, proceed to the <a href="!update-url">update script</a>.</li>
<li>View your <a href="!base-url">existing site</a>.</li>
</ul>', array('!base-url' => $GLOBALS['base_url'], '!update-url' => $GLOBALS['base_path'] . 'update.php'));
        parent::__construct($message, $title);
    }