Mercurial > hg > cmmr2012-drupal-site
annotate vendor/chi-teck/drupal-code-generator/templates/d8/service/custom.twig @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
rev | line source |
---|---|
Chris@4 | 1 {% import 'lib/di.twig' as di %} |
Chris@0 | 2 <?php |
Chris@0 | 3 |
Chris@0 | 4 namespace Drupal\{{ machine_name }}; |
Chris@0 | 5 |
Chris@4 | 6 {% if services %} |
Chris@4 | 7 {{ di.use(services) }} |
Chris@4 | 8 {% endif %} |
Chris@0 | 9 /** |
Chris@0 | 10 * {{ class }} service. |
Chris@0 | 11 */ |
Chris@0 | 12 class {{ class }} { |
Chris@0 | 13 |
Chris@4 | 14 {% if services %} |
Chris@4 | 15 {{ di.properties(services) }} |
Chris@0 | 16 |
Chris@0 | 17 /** |
Chris@4 | 18 * Constructs {{ class|article|lower }} object. |
Chris@0 | 19 * |
Chris@4 | 20 {{ di.annotation(services) }} |
Chris@0 | 21 */ |
Chris@4 | 22 public function __construct({{ di.signature(services) }}) { |
Chris@4 | 23 {{ di.assignment(services) }} |
Chris@0 | 24 } |
Chris@0 | 25 |
Chris@4 | 26 {% endif %} |
Chris@0 | 27 /** |
Chris@4 | 28 * Method description. |
Chris@0 | 29 */ |
Chris@4 | 30 public function doSomething() { |
Chris@4 | 31 // @DCG place your code here. |
Chris@0 | 32 } |
Chris@0 | 33 |
Chris@0 | 34 } |