31 lines
1.4 KiB
YAML
31 lines
1.4 KiB
YAML
![]() |
description: 'Generate commands for the console.'
|
||
|
help: 'The <info>generate:command</info> command helps you generate a new command.'
|
||
|
welcome: 'Welcome to the Drupal Command generator'
|
||
|
options:
|
||
|
extension: 'The name of the Extension (that will contain the command).'
|
||
|
class: 'The Class that describes the command. (Must end with the word ''Command'').'
|
||
|
name: 'The Command name.'
|
||
|
interact: 'Add interact method.'
|
||
|
initialize: 'Add initialize method.'
|
||
|
container-aware: 'Is the command aware of the drupal site installation when executed?'
|
||
|
services: 'Load services from the container.'
|
||
|
generator: 'Add a Generator class for this command.'
|
||
|
questions:
|
||
|
extension: 'Enter the extension name'
|
||
|
class: 'Enter the Command Class. (Must end with the word ''Command'').'
|
||
|
name: 'Enter the Command name.'
|
||
|
interact: 'Do you want to add the interact method?'
|
||
|
initialize: 'Do you want to add the initialize method?'
|
||
|
container-aware: 'Is the command aware of the drupal site installation when executed?'
|
||
|
services: 'Enter your service'
|
||
|
generator: 'Do you want to add a Generator class?.'
|
||
|
messages:
|
||
|
title-not-empty: 'Title cannot be empty'
|
||
|
examples:
|
||
|
- description: 'Generate a command specifying the extension name and type, its class and the name.'
|
||
|
execution: |
|
||
|
drupal generate:command \
|
||
|
--extension="ExtensionName" \
|
||
|
--extension-type="module" \
|
||
|
--class="DefaultCommand" \
|
||
|
--name="CommandName"
|