Security update for Core, with self-updated composer
[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 class {{ class }} extends \Twig_Extension {% endblock %}
19
20 {% set properties = services[1:] %}
21 {% block class_properties %}
22     {% for service in properties %}
23
24    /**
25     * {{ service.class }} definition.
26     *
27     * @var {{ service.short }}
28     */
29     protected ${{service.camel_case_name}};
30     {% endfor %}
31 {% endblock %}
32
33 {% block class_construct %}
34     {% if services|length > 1 %}
35
36    /**
37     * Constructs a new {{ class }} object.
38     */
39     public function __construct({{ servicesAsParameters(services)|join(', ') }}) {
40         parent::__construct($renderer);
41     {{ serviceClassInitialization(properties) }}
42     }
43     {% endif %}
44 {% endblock %}
45
46 {% block class_methods %}
47
48    /**
49     * {@inheritdoc}
50     */
51     public function getTokenParsers() {
52       return [];
53     }
54
55    /**
56     * {@inheritdoc}
57     */
58     public function getNodeVisitors() {
59       return [];
60     }
61
62    /**
63     * {@inheritdoc}
64     */
65     public function getFilters() {
66       return [];
67     }
68
69    /**
70     * {@inheritdoc}
71     */
72     public function getTests() {
73       return [];
74     }
75
76    /**
77     * {@inheritdoc}
78     */
79     public function getFunctions() {
80       return [];
81     }
82
83    /**
84     * {@inheritdoc}
85     */
86     public function getOperators() {
87       return [];
88     }
89
90    /**
91     * {@inheritdoc}
92     */
93     public function getName() {
94       return '{{ name }}';
95     }
96 {% endblock %}