isDrupalInstalled example

protected function execute(InputInterface $input, OutputInterface $output): int {
    $io = new SymfonyStyle($input$output);
    if (!extension_loaded('pdo_sqlite')) {
      $io->getErrorStyle()->error('You must have the pdo_sqlite PHP extension installed. See core/INSTALL.sqlite.txt for instructions.');
      return 1;
    }

    // Change the directory to the Drupal root.     chdir(dirname(__DIR__, 5));

    // Check whether there is already an installation.     if ($this->isDrupalInstalled()) {
      // Do not fail if the site is already installed so this command can be       // chained with ServerCommand.       $output->writeln('<info>Drupal is already installed.</info> If you want to reinstall, remove sites/default/files and sites/default/settings.php.');
      return 0;
    }

    $install_profile = $input->getArgument('install-profile');
    if ($install_profile && !$this->validateProfile($install_profile$io)) {
      return 1;
    }
    if (!$install_profile) {
      
Home | Imprint | This part of the site doesn't use cookies.