File tree Expand file tree Collapse file tree 3 files changed +19
-22
lines changed Expand file tree Collapse file tree 3 files changed +19
-22
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,13 @@ use Drupal\Console\Core\Command\ContainerAwareCommand;
16
16
{% else %}
17
17
use Drupal\Console\Core\Command\Command;
18
18
{% endif %}
19
- use Drupal\Console\Annotations\DrupalCommand;
20
19
{% endblock %}
21
20
22
21
{% block class_declaration %}
23
22
/**
24
23
* Class {{ class_name }}.
25
24
*
26
- * @ DrupalCommand (
25
+ * Drupal\Console\Annotations\ DrupalCommand (
27
26
* extension="{{extension }}",
28
27
* extensionType="{{ extension_type }}"
29
28
* )
@@ -39,6 +38,7 @@ class {{ class_name }} extends {% if container_aware %}ContainerAwareCommand{% e
39
38
{{ serviceClassInitialization(services ) }}
40
39
parent::__construct();
41
40
}
41
+
42
42
{% endif %}
43
43
{% endblock %}
44
44
@@ -53,19 +53,19 @@ class {{ class_name }} extends {% if container_aware %}ContainerAwareCommand{% e
53
53
}
54
54
55
55
{% if initialize %}
56
- /**
57
- * {@inheritdoc}
58
- */
56
+ /**
57
+ * {@inheritdoc}
58
+ */
59
59
protected function initialize(InputInterface $input, OutputInterface $output) {
60
60
parent::initialize($input, $output);
61
61
$this->getIo()->info('initialize');
62
62
}
63
63
64
64
{% endif %}
65
65
{% if interact %}
66
- /**
67
- * {@inheritdoc}
68
- */
66
+ /**
67
+ * {@inheritdoc}
68
+ */
69
69
protected function interact(InputInterface $input, OutputInterface $output) {
70
70
$this->getIo()->info('interact');
71
71
}
@@ -81,5 +81,4 @@ class {{ class_name }} extends {% if container_aware %}ContainerAwareCommand{% e
81
81
$this->generator->generate([]);
82
82
{% endif %}
83
83
}
84
-
85
- {%- endblock -%}
84
+ {% endblock %}
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ description: 'Drupal Console generated command.'
2
2
options: {}
3
3
arguments: {}
4
4
messages:
5
- success: 'I am a new generated command.'
5
+ success: 'I am a new generated command.'
Original file line number Diff line number Diff line change @@ -15,24 +15,22 @@ use Drupal\Console\Core\Generator\GeneratorInterface;
15
15
16
16
{% block class_declaration %}
17
17
/**
18
- * Class {{ class_name }}
18
+ * Class {{ class_name }}.
19
19
*
20
20
* @package Drupal\Console\Generator
21
21
*/
22
- class {{ class_name }} extends Generator implements GeneratorInterface
23
- {% endblock %}
22
+ class {{ class_name }} extends Generator implements GeneratorInterface {% endblock %}
24
23
25
24
{% block class_methods %}
26
25
/**
27
26
* {@inheritdoc}
28
27
*/
29
- public function generate(array $parameters)
30
- {
31
- // Example how to render a twig template using the renderFile method
32
- // $this->renderFile(
33
- // 'path/to/file.php.twig',
34
- // 'path/to/file.php',
35
- // $parameters
36
- // );
28
+ public function generate(array $parameters) {
29
+ // Example how to render a twig template using the renderFile method
30
+ // $this->renderFile(
31
+ // 'path/to/file.php.twig',
32
+ // 'path/to/file.php',
33
+ // $parameters
34
+ // );.
37
35
}
38
36
{% endblock %}
You can’t perform that action at this time.
0 commit comments