438965049357f1dbf64b6d4ea0078e5077bda625
[yaffs-website] / vendor / drupal / console / templates / module / src / TwigExtension / twig-extension.php.twig
1 {% extends "base/class.php.twig" %}
2
3 {% block file_path %}
4 \Drupal\{{module}}\TwigExtension\{{ class }}.
5 {% endblock %}
6
7 {% block namespace_class %}
8 namespace Drupal\{{module}}\TwigExtension;
9 {% endblock %}
10
11 {% block use_class %}
12 {% endblock %}
13
14 {% block class_declaration %}
15 /**
16  * Class {{ class }}.
17  *
18  * @package Drupal\{{module}}
19  */
20 class {{ class }} extends \Twig_Extension {% endblock %}
21
22 {% set properties = services[1:] %}
23 {% block class_properties %}
24     {% for service in properties %}
25
26    /**
27     * {{ service.class }} definition.
28     *
29     * @var \{{ service.class }}
30     */
31     protected ${{service.camel_case_name}};
32     {% endfor %}
33 {% endblock %}
34
35 {% block class_construct %}
36     {% if services|length > 1 %}
37
38    /**
39     * Constructs a new {{ class }} object.
40     */
41     public function __construct({{ servicesAsParameters(services)|join(', ') }}) {
42         parent::__construct($renderer);
43     {{ serviceClassInitialization(properties) }}
44     }
45     {% endif %}
46 {% endblock %}
47
48 {% block class_methods %}
49
50    /**
51     * {@inheritdoc}
52     */
53     public function getTokenParsers() {
54       return [];
55     }
56
57    /**
58     * {@inheritdoc}
59     */
60     public function getNodeVisitors() {
61       return [];
62     }
63
64    /**
65     * {@inheritdoc}
66     */
67     public function getFilters() {
68       return [];
69     }
70
71    /**
72     * {@inheritdoc}
73     */
74     public function getTests() {
75       return [];
76     }
77
78    /**
79     * {@inheritdoc}
80     */
81     public function getFunctions() {
82       return [];
83     }
84
85    /**
86     * {@inheritdoc}
87     */
88     public function getOperators() {
89       return [];
90     }
91
92    /**
93     * {@inheritdoc}
94     */
95     public function getName() {
96       return '{{ name }}';
97     }
98 {% endblock %}