1 description: 'Generate & Register a controller'
2 help: 'The <info>generate:controller</info> command helps you generate a new controller.'
3 welcome: 'Welcome to the Drupal Controller generator'
5 module: 'The Module name.'
6 class: 'Controller Class name'
7 routes: 'The routes, must be an array containing [title, method, path]'
8 services: 'Load services from the container.'
9 test: 'Generate a test class'
11 module: 'Enter the module name'
12 class: 'Enter the Controller class name'
13 title: 'Enter the Controller method title (to stop adding more methods, leave this empty)'
14 method: 'Enter the action method name'
15 path: 'Enter the route path'
16 services: 'Enter your service'
17 test: 'Do you want to generate a unit test class?'
19 title-empty: 'Title must contain a value (you must enter at least one method)'
20 title-already-added: 'Title was already added'
21 method-name-already-added: 'Method name was already added'
22 path-already-added: 'Path was already added'
24 - description: 'Generate controller specifying the module name, the class name and its routes'
26 drupal generate:controller \
27 --module="modulename" \
28 --class="DefaultController" \
29 --routes='"title":"ControllerMethod", "name":"modulename.default_controller_hello", "method":"hello", "path":"/modulename/hello/{name}"' \