
| Current Path : /var/www/html/rocksensor/vendor/chi-teck/drupal-code-generator/src/Command/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor/vendor/chi-teck/drupal-code-generator/src/Command/Readme.php |
<?php
declare(strict_types=1);
namespace DrupalCodeGenerator\Command;
use DrupalCodeGenerator\Application;
use DrupalCodeGenerator\Asset\AssetCollection;
use DrupalCodeGenerator\Attribute\Generator;
use DrupalCodeGenerator\GeneratorType;
#[Generator(
name: 'readme',
description: 'Generates README file',
templatePath: Application::TEMPLATE_PATH . '/_readme',
type: GeneratorType::MODULE_COMPONENT,
)]
final class Readme extends BaseGenerator {
/**
* {@inheritdoc}
*/
protected function generate(array &$vars, AssetCollection $assets): void {
$ir = $this->createInterviewer($vars);
$vars['machine_name'] = $ir->askMachineName();
$vars['name'] = $ir->askName();
$assets->addFile('README.md', 'readme.twig');
}
}