3 namespace DrupalCodeGenerator\Command\Other;
5 use DrupalCodeGenerator\Command\BaseGenerator;
6 use Symfony\Component\Console\Input\InputInterface;
7 use Symfony\Component\Console\Output\OutputInterface;
8 use Symfony\Component\Console\Question\Question;
11 * Implements other:html-page command.
13 class HtmlPage extends BaseGenerator {
15 protected $name = 'other:html-page';
16 protected $description = 'Generates a simple html page';
17 protected $alias = 'html-page';
18 protected $label = 'HTML page';
19 protected $destination = FALSE;
24 protected function interact(InputInterface $input, OutputInterface $output) {
25 $questions['file_name'] = new Question('File name', 'index.html');
27 $this->collectVars($input, $output, $questions);
31 ->template('other/html.twig');
34 ->path('css/main.css')
35 ->content('body{background-color: #EEE}');
39 ->content("console.log('It works!');");