This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/chi-teck/drupal-code-generator/templates/d8/service/custom.twig
2018-11-23 12:29:20 +00:00

35 lines
551 B
Twig

{% import 'lib/di.twig' as di %}
<?php
namespace Drupal\{{ machine_name }};
{% if services %}
{{ di.use(services) }}
{% endif %}
/**
* {{ class }} service.
*/
class {{ class }} {
{% if services %}
{{ di.properties(services) }}
/**
* Constructs {{ class|article|lower }} object.
*
{{ di.annotation(services) }}
*/
public function __construct({{ di.signature(services) }}) {
{{ di.assignment(services) }}
}
{% endif %}
/**
* Method description.
*/
public function doSomething() {
// @DCG place your code here.
}
}