36 lines
729 B
Twig
36 lines
729 B
Twig
<?php
|
|
|
|
namespace Drupal\{{ machine_name }}\Command;
|
|
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Drupal\Console\Core\Command\{{ base_class }};
|
|
|
|
/**
|
|
* Class {{ class }}.
|
|
*
|
|
* Drupal\Console\Annotations\DrupalCommand (
|
|
* extension="{{ machine_name }}",
|
|
* extensionType="module"
|
|
* )
|
|
*/
|
|
class {{ class }} extends {{ base_class }} {
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function configure() {
|
|
$this
|
|
->setName('{{ command_name }}')
|
|
->setDescription('{{ description }}');
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function execute(InputInterface $input, OutputInterface $output) {
|
|
$this->getIo()->info('It works!');
|
|
}
|
|
|
|
}
|