X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fchi-teck%2Fdrupal-code-generator%2Fsrc%2FCommand%2FDrupal_8%2FModule%2FStandard.php;fp=vendor%2Fchi-teck%2Fdrupal-code-generator%2Fsrc%2FCommand%2FDrupal_8%2FModule%2FStandard.php;h=581cde911adfa751af35b3e00058322e64abc4ec;hp=bc987e1c9e8e486769d9f08238e722027e3235be;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Module/Standard.php b/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Module/Standard.php index bc987e1c9..581cde911 100644 --- a/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Module/Standard.php +++ b/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Module/Standard.php @@ -104,10 +104,15 @@ class Standard extends BaseGenerator { if ($options['controller']) { $controller_class = $class_prefix . 'Controller'; + $controller_vars = [ + 'class' => $controller_class, + 'services' => [], + ]; + $this->addFile() ->path("{machine_name}/src/Controller/$controller_class.php") ->template('d8/controller.twig') - ->vars(['class' => $controller_class] + $vars); + ->vars($controller_vars + $vars); $routing_vars = [ 'route_name' => $vars['machine_name'] . '.example',