Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{% import '@lib/di.twig' as di %}
<?php
declare(strict_types=1);
namespace Drupal\{{ machine_name }}\Command;
{% apply sort_namespaces %}
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
{% if services %}
{{ di.use(services) }}
{% endif %}
{% endapply %}
// phpcs:disable Drupal.Commenting.ClassComment.Missing
#[AsCommand(
name: '{{ command.name }}',
description: '{{ command.description }}',
aliases: ['{{ command.alias }}'],
)]
final class {{ class }} extends Command {
{% if services %}
/**
* Constructs {{ class|article }} object.
*/
public function __construct(
{{ di.signature(services) }}
) {
{# Parent constructor configures the command. #}
parent::__construct();
}
{% endif %}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output): int {
// @todo Place your code here.
$output->writeln('<info>It works!</info>');
return self::SUCCESS;
}
}

View File

@ -0,0 +1,9 @@
{% import '@lib/di.twig' as di %}
services:
{{ service_name }}:
class: Drupal\{{ machine_name }}\Command\{{ class }}
{% if services %}
arguments: [{{ di.arguments(services) }}]
{% endif %}
tags:
- { name: console.command }