1 {% import 'lib/di.twig' as di %}
4 namespace Drupal\{{ machine_name }}\Controller;
7 use Drupal\Core\Controller\ControllerBase;
9 use Symfony\Component\DependencyInjection\ContainerInterface;
10 {{ di.use(services) }}
15 * Returns responses for {{ name }} routes.
17 class {{ class }} extends ControllerBase {
20 {{ di.properties(services) }}
23 * The controller constructor.
25 {{ di.annotation(services) }}
27 public function __construct({{ di.signature(services) }}) {
28 {{ di.assignment(services) }}
34 public static function create(ContainerInterface $container) {
36 {{ di.container(services) }}
42 * Builds the response.
44 public function build() {
48 '#markup' => $this->t('It works!'),