Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions templates/module/src/Command/command.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
{% if container_aware %}
use Drupal\Console\Core\Command\Shared\ContainerAwareCommandTrait;
use Drupal\Console\Core\Command\ContainerAwareCommand;
{% else %}
use Drupal\Console\Core\Command\Shared\CommandTrait;
use Drupal\Console\Core\Command\Command;
{% endif %}
use Drupal\Console\Core\Style\DrupalStyle;
use Drupal\Console\Annotations\DrupalCommand;
Expand All @@ -30,7 +30,7 @@ use Drupal\Console\Annotations\DrupalCommand;
* extensionType="{{ extensionType }}"
* )
*/
class {{ class_name }} extends Command {% endblock %}
class {{ class_name }} extends {% if container_aware %}ContainerAwareCommand{% else %}Command{% endif %} {% endblock %}
{% block class_construct %}
{% if services is not empty %}

Expand All @@ -44,15 +44,6 @@ class {{ class_name }} extends Command {% endblock %}
{% endif %}
{% endblock %}

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

{% endblock %}

{% block class_methods %}
/**
* {@inheritdoc}
Expand Down