{% extends "base/class.php.twig" %}

{% block file_path %}
\Drupal\{{module}}\Command\{{ class }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{module}}\Command;
{% endblock %}

{% block use_class %}
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command as BaseCommand;
{% if container_aware %}
use Drupal\Console\Command\Shared\ContainerAwareCommandTrait;
{% else %}
use Drupal\Console\Command\Shared\CommandTrait;
{% endif %}
use Drupal\Console\Style\DrupalStyle;
{% endblock %}

{% block class_declaration %}
/**
 * Class {{ class }}.
 *
 * @package Drupal\{{module}}
 */
class {{ class }} extends BaseCommand {% endblock %}

{% block use_trait %}
{% if container_aware %}
  use ContainerAwareCommandTrait;
{% else %}
  use CommandTrait;
{% endif %}

{% endblock %}

{% block class_methods %}
  /**
   * {@inheritdoc}
   */
  protected function configure() {
    $this
      ->setName('{{ name }}')
      ->setDescription($this->trans('commands.{{ command_key }}.description'));
  }

  /**
   * {@inheritdoc}
   */
  protected function execute(InputInterface $input, OutputInterface $output) {
    $io = new DrupalStyle($input, $output);

    $text = sprintf(
      'I am a new generated command for the module: %s',
      $this->getModule()
    );

    $io->info($text);
  }
{% endblock %}
