5 * Contains \Drupal\Console\Generator\DatabaseSettingsGenerator.
8 namespace Drupal\Console\Generator;
10 use Drupal\Console\Core\Generator\Generator;
11 use Drupal\Core\DrupalKernelInterface;
13 class DatabaseSettingsGenerator extends Generator
16 * @var DrupalKernelInterface
21 * DatabaseSettingsGenerator constructor.
23 * @param DrupalKernelInterface $kernel
25 public function __construct(
26 DrupalKernelInterface $kernel
28 $this->kernel = $kernel;
33 * Generator Plugin Block.
37 public function generate($parameters)
39 $settingsFile = $this->kernel->getSitePath().'/settings.php';
40 if (!is_writable($settingsFile)) {
43 return $this->renderFile(
44 'database/add.php.twig',