-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathgenerate.plugin.block.yml
More file actions
36 lines (36 loc) · 1.79 KB
/
generate.plugin.block.yml
File metadata and controls
36 lines (36 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
description: 'Generate a plugin block'
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: '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: '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'
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'
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":""'
--inputs='"name":"inputRadio" | "type":"radio" | "label":"inputRadio" | "options":"array("inputRadio1" => "inputRadio 1", "inputRadio2" => "inputRadio 2")"'