
| Current Path : /var/www/html/vendor/chi-teck/drupal-code-generator/src/Command/Service/ |
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/vendor/chi-teck/drupal-code-generator/src/Command/Service/PathProcessor.php |
<?php declare(strict_types=1);
namespace DrupalCodeGenerator\Command\Service;
use DrupalCodeGenerator\Application;
use DrupalCodeGenerator\Command\ModuleGenerator;
/**
* Implements service:path-processor command.
*/
final class PathProcessor extends ModuleGenerator {
protected string $name = 'service:path-processor';
protected string $description = 'Generates a path processor service';
protected string $alias = 'path-processor';
protected string $templatePath = Application::TEMPLATE_PATH . '/service/path-processor';
/**
* {@inheritdoc}
*/
protected function generate(array &$vars): void {
$this->collectDefault($vars);
$vars['class'] = $this->ask('Class', 'PathProcessor{machine_name|camelize}');
$this->addFile('src/PathProcessor/{class}.php', 'path-processor');
$this->addServicesFile()->template('services');
}
}