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/drupal/console-en/translations/generate.controller.yml
2018-11-23 12:29:20 +00:00

30 lines
1.4 KiB
YAML

description: 'Generate & Register a controller'
help: 'The <info>generate:controller</info> command helps you generate a new controller.'
welcome: 'Welcome to the Drupal Controller generator'
options:
module: 'The Module name.'
class: 'Controller Class name'
routes: 'The routes, must be an array containing [title, method, path]'
services: 'Load services from the container.'
test: 'Generate a test class'
questions:
module: 'Enter the module name'
class: 'Enter the Controller class name'
title: 'Enter the Controller method title (to stop adding more methods, leave this empty)'
method: 'Enter the action method name'
path: 'Enter the route path'
services: 'Enter your service'
test: 'Do you want to generate a unit test class?'
messages:
title-empty: 'Title must contain a value (you must enter at least one method)'
title-already-added: 'Title was already added'
method-name-already-added: 'Method name was already added'
path-already-added: 'Path was already added'
examples:
- description: 'Generate controller specifying the module name, the class name and its routes'
execution: |
drupal generate:controller \
--module="modulename" \
--class="DefaultController" \
--routes='"title":"ControllerMethod", "name":"modulename.default_controller_hello", "method":"hello", "path":"/modulename/hello/{name}"' \
--test