Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[generate:plugin:block] Change example to execute #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion translations/generate.breakpoint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ examples:
execution: |
drupal generate:breakpoint \
--theme="classy" \
--breakpoints='"breakpoint_name":"narrow", "breakpoint_label":"narrow", "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)", "breakpoint_weight":"1", "breakpoint_multipliers":"1x"'
--breakpoints='"breakpoint_name":"narrow" | "breakpoint_label":"narrow" | "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)" | "breakpoint_weight":"1" | "breakpoint_multipliers":"1x"'
10 changes: 5 additions & 5 deletions translations/generate.composer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ examples:
--license="GPL-2.0+" \
--homepage="https://www.drupal.org/project/module_name" \
--minimum-stability="stable" \
--authors='"name":"Author name", "email":"[email protected]", "homepage":"http://website.com", "role":"Developer"' \
--support='"channel":"email", "url":"[email protected]"' \
--support='"channel":"source", "url":"http://github.com"' \
--required='"name":"drupal/views", "version":"^1.0"' \
--required='"name":"drupal/token", "version":"^2.0"'
--authors='"name":"Author name" | "email":"[email protected]" | "homepage":"http://website.com" | "role":"Developer"' \
--support='"channel":"email" | "url":"[email protected]"' \
--support='"channel":"source" | "url":"http://github.com"' \
--required='"name":"drupal/views" | "version":"^1.0"' \
--required='"name":"drupal/token" | "version":"^2.0"'
6 changes: 3 additions & 3 deletions translations/generate.controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ examples:
- description: 'Generate controller specifying the module name, the class name and its routes'
execution: |
drupal generate:controller \
--module="modulename" \
--module="block" \
--class="DefaultController" \
--routes='"title":"ControllerMethod", "name":"modulename.default_controller_hello", "method":"hello", "path":"/modulename/hello/{name}"' \
--test
--routes='"title":"ControllerMethod" | "name":"modulename.default_controller_hello" | "method":"hello" | "path":"/modulename/hello/{name}"' \
--test
4 changes: 2 additions & 2 deletions translations/generate.form.alter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ examples:
execution: |
drupal generate:form:alter \
--module="modulename" \
--inputs='"name":"inputtext", "type":"text_format", "label":"InputText", "options":"", "description":"Just an input text", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""'
--inputs='"name":"inputtext" | "type":"text_format" | "label":"InputText" | "options":"" | "description":"Just an input text" | "maxlength":"" | "size":"" | "default_value":"" | "weight":"0" | "fieldset":""' \
--inputs='"name":"email" | "type":"email" | "label":"Email" | "options":"" | "description":"Just an email input" | "maxlength":"" | "size":"" | "default_value":"" | "weight":"0" | "fieldset":""'
4 changes: 2 additions & 2 deletions translations/generate.form.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ examples:
--class="DefaultForm" \
--form-id="default_form" \
--config-file \
--inputs='"name":"inputname", "type":"text_format", "label":"InputName", "options":"", "description":"Just a text input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"inputname" | "type":"text_format" | "label":"InputName" | "options":"" | "description":"Just a text input" | "maxlength":"" | "size":"" | "default_value":"" | "weight":"0" | "fieldset":""' \
--inputs='"name":"email" | "type":"email" | "label":"Email" | "options":"" | "description":"Just an email input" | "maxlength":"" | "size":"" | "default_value":"" | "weight":"0" | "fieldset":""' \
--path="/modulename/form/default"
4 changes: 2 additions & 2 deletions translations/generate.form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ examples:
--class="DefaultForm" \
--form-id="default_form" \
--config-file \
--inputs='"name":"inputname", "type":"text_format", "label":"InputName", "options":"", "description":"Just a text input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"inputname" | "type":"text_format" | "label":"InputName" | "options":"" | "description":"Just a text input" | "maxlength":"" | "size":"" | "default_value":"" | "weight":"0" | "fieldset":""' \
--inputs='"name":"email" | "type":"email" | "label":"Email" | "options":"" | "description":"Just an email input" | "maxlength":"" | "size":"" | "default_value":"" | "weight":"0" | "fieldset":""' \
--path="/modulename/form/default"
7 changes: 7 additions & 0 deletions translations/generate.permissions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ questions:
suggestions:
access-content: 'Access content'
allow-access-content: 'Allow access to my content'
examples:
- description: 'Generate a permission'
execution: |
drupal generate:permissions \
--module="modulename" \
--permissions='"permission":"access content" | "title":"Access content" | "description":"Allow access to my content" | "restrict_access":"none"' \
--permissions='"permission":"access content 2" | "title":"Access content 2" | "description":"Allow access to my content 2" | "restrict_access":"none"'
4 changes: 2 additions & 2 deletions translations/generate.plugin.block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ questions:
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'
Expand All @@ -33,4 +32,5 @@ examples:
--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":"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")"'
6 changes: 3 additions & 3 deletions translations/generate.plugin.ckeditorbutton.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ examples:
--class="DefaultCKEditorButton" \
--label="Default ckeditor button" \
--plugin-id="default_ckeditor_button" \
--buttons='name":"Default ckeditor button", "label":"Default ckeditor button", "icon":"modules/custom/modulename/js/plugins/default_ckeditor_button/images/icon.png"' \
--buttons='name":"My ckeditor button", "label":"My ckeditor button", "icon":"modules/custom/modulename/js/plugins/my_ckeditor_button/images/icon.png"' \
--buttons='name":"Default ckeditor button" | "label":"Default ckeditor button" | "icon":"modules/custom/modulename/js/plugins/default_ckeditor_button/images/icon.png"' \
--buttons='name":"My ckeditor button" | "label":"My ckeditor button" | "icon":"modules/custom/modulename/js/plugins/my_ckeditor_button/images/icon.png"' \
--no-interaction

drupal generate:plugin:ckeditorbutton \
Expand All @@ -35,4 +35,4 @@ examples:
--label="Default ckeditor button" \
--plugin-id="default ckeditor button" \
--button-name="Default ckeditor button" \
--button-icon-path="modules/custom/modulename/js/plugins/default ckeditor button/images/icon.png"
--buttons='name":"Default ckeditor button" | "label":"Default ckeditor button" | "icon":"modules/custom/modulename/js/plugins/default_ckeditor_button/images/icon.png"'
8 changes: 4 additions & 4 deletions translations/generate.plugin.migrate.source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ examples:
--plugin-id="default_plugin_class" \
--table="users" \
--alias="u" \
--fields='"id":"id", "description":"the user id"' \
--fields='"id":"username", "description":"the username"' \
--fields='"id":"password", "description":"the user password"' \
--fields='"id":"email", "description":"the user email"'
--fields='"id":"id" | "description":"the user id"' \
--fields='"id":"username" | "description":"the username"' \
--fields='"id":"password" | "description":"the user password"' \
--fields='"id":"email" | "description":"the user email"'
4 changes: 2 additions & 2 deletions translations/generate.plugin.rules.action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ examples:
--label="Default Action" \
--plugin-id="default_action" \
--category="Action category" \
--context='"name":"user", "type":"entity:user", "label":"Context label", "description":"Context description"'
--context='"name":"user" | "type":"entity:user" | "label":"Context label" | "description":"Context description"'
- description: 'Generate a entity rule action plugin specifying the module name, the class, its label, the plugin id, the type, the category and its context'
execution: |
drupal generate:plugin:rules:action \
Expand All @@ -38,4 +38,4 @@ examples:
--label="Default Action" \
--plugin-id="default_action" \
--category="Action category" \
--context='"entity":"node", "type":"entity", "label":"Context label", "description":"Context description"'
--context='"entity":"node" | "type":"entity" | "label":"Context label" | "description":"Context description"'
2 changes: 1 addition & 1 deletion translations/generate.plugin.rules.condition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ examples:
--label="Default Action" \
--plugin-id="default_condition" \
--category="Action category" \
--context='"name":"user", "type":"entity:user", "label":"Context label", "description":"Context description"'
--context='"name":"user" | "type":"entity:user" | "label":"Context label" | "description":"Context description"'
4 changes: 1 addition & 3 deletions translations/generate.plugin.views.field.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ examples:
execution: |
drupal generate:plugin:views:field \
--module="modulename" \
--class="CustomViewsField" \
--title="Custom views field" \
--description="My awesome custom views field plugin."
--fields='"title":"Custom views field" | "description":"My awesome custom views field plugin." | "class_name":"CustomViewsField" | "class_machine_name":"custom_views_field"'
6 changes: 3 additions & 3 deletions translations/generate.theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ examples:
--package="MyThemePackage" \
--global-library="global-styling" \
--base-theme="stable" \
--regions='"region_name":"Content", "region_machine_name":"content"' \
--regions='"region_name":"Panel", "region_machine_name":"panel"' \
--breakpoints='"breakpoint_name":"narrow", "breakpoint_label":"narrow", "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)", "breakpoint_weight":"1", "breakpoint_multipliers":"1x"'
--regions='"region_name":"Content" | "region_machine_name":"content"' \
--regions='"region_name":"Panel" | "region_machine_name":"panel"' \
--breakpoints='"breakpoint_name":"narrow" | "breakpoint_label":"narrow" | "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)" | "breakpoint_weight":"1" | "breakpoint_multipliers":"1x"'