help: 'The <info>generate:plugin:block</info> command helps you generate a new Plugin block.'
welcome: 'Welcome to the Drupal Plugin Block generator'
options:
- module: common.options.module
- class: 'Plugin class name'
- label: 'Plugin label'
- plugin-id: 'Plugin id'
- inputs: common.options.inputs
- services: common.options.services
- theme-region: 'Theme region to render Plugin Block'
+ module: 'The Module name.'
+ class: 'Plugin class name'
+ label: 'Plugin label'
+ plugin-id: 'Plugin id'
+ inputs: 'Create inputs in a form.'
+ services: 'Load services from the container.'
+ theme-region: 'Theme region to render Plugin Block'
questions:
- module: common.questions.module
- class: 'Enter the plugin class name'
- label: 'Enter the plugin label'
- plugin-id: 'Enter the plugin id'
- inputs: common.questions.inputs
- services: common.questions.services
- theme-region: 'Enter the theme region to render the Plugin Block.'
+ module: 'Enter the module name'
+ class: 'Enter the plugin class name'
+ label: 'Enter the plugin label'
+ plugin-id: 'Enter the plugin id'
+ services: 'Enter your service'
+ theme-region: 'Enter the theme region to render the Plugin Block.'
+ type: 'Enter New field type'
+ label: 'Input label'
+ description: 'Description'
+ default-value: 'Default value'
+ weight: 'Weight for input item'
messages:
- inputs: "\nYou can add input fields to create special configurations in the block.\nThis is optional, press <info>enter</info> to <info>continue</info>"
- invalid-theme-region: 'Region "%s" is invalid'
+ inputs: "\nYou can add input fields to create special configurations in the block.\nThis is optional, press <info>enter</info> to <info>continue</info>"
+ invalid-theme-region: 'Region "%s" is invalid'
+examples:
+ - description: 'Generate a plugin block in the header region with an input field specifying the module name, the class, the label, its id, the region and the input'
+ execution: |
+ drupal generate:plugin:block \
+ --module="modulename" \
+ --class="DefaultBlock" \
+ --label="Default block" \
+ --plugin-id="default_block" \
+ --theme-region="header" \
+ --inputs='"name":"inputtext", "type":"text_format", "label":"InputText", "options":"", "description":"Just an input text", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""'
\ No newline at end of file