
| Current Path : /var/www/html/vendor/chi-teck/drupal-code-generator/src/Command/Plugin/ |
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/Plugin/RestResource.php |
<?php declare(strict_types=1);
namespace DrupalCodeGenerator\Command\Plugin;
use DrupalCodeGenerator\Application;
/**
* Implements plugin:rest-resource command.
*/
final class RestResource extends PluginGenerator {
protected string $name = 'plugin:rest-resource';
protected string $description = 'Generates rest resource plugin';
protected string $alias = 'rest-resource';
protected string $templatePath = Application::TEMPLATE_PATH . '/plugin/rest-resource';
protected string $label = 'REST resource';
protected string $pluginClassSuffix = 'Resource';
/**
* {@inheritdoc}
*/
protected function generate(array &$vars): void {
$this->collectDefault($vars);
$this->addFile('src/Plugin/rest/resource/{class}.php', 'rest-resource');
}
}