view vendor/chi-teck/drupal-code-generator/templates/d8/service/custom.twig @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
line wrap: on
line source
{% 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 }} object.
   *
{{ di.annotation(services) }}
   */
  public function __construct({{ di.signature(services) }}) {
{{ di.assignment(services) }}
  }

{% endif %}
  /**
   * Method description.
   */
  public function doSomething() {
    // @DCG place your code here.
  }

}