From f682cf35cddb97e8c428b81f33729c5b25ef90c6 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Mon, 10 Jul 2017 16:57:37 -0500 Subject: [PATCH 01/14] Fixing bug --- translations/debug.database.log.yml | 24 ++++++++++++------------ translations/debug.database.table.yml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/translations/debug.database.log.yml b/translations/debug.database.log.yml index c2189ae..fb23aaf 100644 --- a/translations/debug.database.log.yml +++ b/translations/debug.database.log.yml @@ -1,17 +1,17 @@ description: 'Displays current log events for the application' arguments: - event-id: 'DBLog event ID' + event-id: 'DBLog event ID' options: - asc: 'List events in ascending order' - limit: 'Limit results to a specific number' - offset: 'Starting point of a limit' - yml: 'Print in a yml style' + asc: 'List events in ascending order' + limit: 'Limit results to a specific number' + offset: 'Starting point of a limit' + yml: 'Print in a yml style' messages: - not-found: 'DBLog event "%s" wasn''t found' + not-found: 'DBLog event "%s" wasn''t found' examples: - - description: 'List all the entries on the log' - execution: | - drupal debug:database:log - - description: 'List specific log entry by Event ID' - execution: | - drupal debug:database:log 21228 \ No newline at end of file + - description: 'List all the entries on the log' + execution: | + drupal debug:database:log + - description: 'List specific log entry by Event ID' + execution: | + drupal debug:database:log 21228 diff --git a/translations/debug.database.table.yml b/translations/debug.database.table.yml index ca450d3..607e6f9 100644 --- a/translations/debug.database.table.yml +++ b/translations/debug.database.table.yml @@ -14,5 +14,5 @@ examples: execution: | drupal debug:database:table - description: 'Show fields on the node table or another specified on the argument' - execution: | - drupal debug:database:table node + execution: | + drupal debug:database:table node From 858adb88ea01ccb7c9770f5ce26209cb9dec74c9 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Mon, 10 Jul 2017 16:58:14 -0500 Subject: [PATCH 02/14] Adding entity:delete example --- translations/entity.delete.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/translations/entity.delete.yml b/translations/entity.delete.yml index 2f9d68a..80c0289 100644 --- a/translations/entity.delete.yml +++ b/translations/entity.delete.yml @@ -8,4 +8,8 @@ questions: entity-definition-id: 'Enter the Entity definitin id' entity-id: 'Enter the Entity ID to be deleted' messages: - deleted: 'Entity %s with id %s was deleted successfully' \ No newline at end of file + deleted: 'Entity %s with id %s was deleted successfully' +examples: + - description: 'Delete entity type content using node id' + execution: | + drupal entity:delete node 1 \ No newline at end of file From 0a097c350451edc4718af566e727a5d8429a5895 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Mon, 10 Jul 2017 16:58:50 -0500 Subject: [PATCH 03/14] Adding generate commands examples Fixing tabs --- .../generate.authentication.provider.yml | 7 ++ translations/generate.breakpoint.yml | 24 ++++--- translations/generate.cache.context.yml | 11 ++- translations/generate.command.yml | 28 +++++--- translations/generate.controller.yml | 40 ++++++----- translations/generate.entity.bundle.yml | 21 ++++-- translations/generate.entity.config.yml | 33 +++++---- translations/generate.entity.content.yml | 49 +++++++++---- translations/generate.event.subscriber.yml | 12 +++- translations/generate.form.alter.yml | 21 ++++-- translations/generate.form.yml | 58 +++++++++------ translations/generate.help.yml | 8 ++- translations/generate.module.file.yml | 9 ++- translations/generate.module.yml | 70 +++++++++++-------- translations/generate.plugin.block.yml | 42 ++++++----- .../generate.plugin.ckeditorbutton.yml | 34 +++++---- 16 files changed, 310 insertions(+), 157 deletions(-) diff --git a/translations/generate.authentication.provider.yml b/translations/generate.authentication.provider.yml index d515ea5..bd98fdd 100644 --- a/translations/generate.authentication.provider.yml +++ b/translations/generate.authentication.provider.yml @@ -4,3 +4,10 @@ options: class: 'Authentication Provider class' provider-id: 'Provider ID' module: common.options.module +examples: + - description: 'Generate an authentication provider specifying the module, the class and the provider id' + execution: | + drupal generate:authentication:provider \ + --module="modulename" \ + --class="DefaultAuthenticationProvider" \ + --provider-id="default_authentication_provider" diff --git a/translations/generate.breakpoint.yml b/translations/generate.breakpoint.yml index 1905bc2..4c7ad3a 100644 --- a/translations/generate.breakpoint.yml +++ b/translations/generate.breakpoint.yml @@ -2,13 +2,19 @@ description: 'Generate breakpoint' help: 'The generate:breakpoint command helps you generates a new breakpoint' welcome: 'Welcome to the Drupal breakpoint generator' options: - theme: 'Theme name' - breakpoints: Breakpoints + theme: 'Theme name' + breakpoints: Breakpoints questions: - theme: 'Enter the theme name (i.e. classy, stable)' - breakpoint-name: 'Enter breakpoint name' - breakpoint-label: 'Enter breakpoint label' - breakpoint-media-query: 'Enter breakpoint media query' - breakpoint-weight: 'Enter breakpoint weight' - breakpoint-multipliers: 'Enter breakpoint multipliers' - breakpoint-add: 'Do you want to add another breakpoint' + theme: 'Enter the theme name (i.e. classy, stable)' + breakpoint-name: 'Enter breakpoint name' + breakpoint-label: 'Enter breakpoint label' + breakpoint-media-query: 'Enter breakpoint media query' + breakpoint-weight: 'Enter breakpoint weight' + breakpoint-multipliers: 'Enter breakpoint multipliers' + breakpoint-add: 'Do you want to add another breakpoint' +examples: + - description: 'Generate a breakpoint specifying the theme, a breakpoint name, its label, the media query, its weight and multipliers' + 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"' \ No newline at end of file diff --git a/translations/generate.cache.context.yml b/translations/generate.cache.context.yml index b8053f6..62f4d73 100644 --- a/translations/generate.cache.context.yml +++ b/translations/generate.cache.context.yml @@ -1,4 +1,11 @@ description: 'Generate a cache context' questions: - name: 'Enter the cache context name' - class: 'Cache context class name' + name: 'Enter the cache context name' + class: 'Cache context class name' +examples: + - description: 'Generate cache for a context specifying the module, the context name and its class' + execution: | + drupal generate:cache:context \ + --module="modulename" \ + --cache-context="ContextName" \ + --class="DefaultCacheContext" \ No newline at end of file diff --git a/translations/generate.command.yml b/translations/generate.command.yml index 0b9c665..46f3323 100644 --- a/translations/generate.command.yml +++ b/translations/generate.command.yml @@ -2,15 +2,23 @@ description: 'Generate commands for the console.' help: 'The generate:command command helps you generate a new command.' welcome: 'Welcome to the Drupal Command generator' options: - module: 'The name of the Module (that will contain the command).' - controller-title: 'Controller title.' - class: 'The Class that describes the command. (Must end with the word ''Command'').' - name: 'The Command name.' - container-aware: 'Is the command aware of the drupal site installation when executed' + module: 'The name of the Module (that will contain the command).' + controller-title: 'Controller title.' + class: 'The Class that describes the command. (Must end with the word ''Command'').' + name: 'The Command name.' + container-aware: 'Is the command aware of the drupal site installation when executed' questions: - module: common.questions.module - class: 'Enter the Command Class. (Must end with the word ''Command'').' - name: 'Enter the Command name.' - container-aware: 'Is the command aware of the drupal site installation when executed?.' + module: common.questions.module + class: 'Enter the Command Class. (Must end with the word ''Command'').' + name: 'Enter the Command name.' + container-aware: 'Is the command aware of the drupal site installation when executed?.' messages: - title-not-empty: 'Title cannot be empty' + 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" \ No newline at end of file diff --git a/translations/generate.controller.yml b/translations/generate.controller.yml index 9871669..bbd4cf7 100644 --- a/translations/generate.controller.yml +++ b/translations/generate.controller.yml @@ -2,21 +2,29 @@ description: 'Generate & Register a controller' help: 'The generate:controller command helps you generate a new controller.' welcome: 'Welcome to the Drupal Controller generator' options: - module: common.options.module - class: 'Controller Class name' - routes: 'The routes, must be an array containing [title, method, path]' - services: common.options.services - test: 'Generate a test class' + module: common.options.module + class: 'Controller Class name' + routes: 'The routes, must be an array containing [title, method, path]' + services: common.options.services + test: 'Generate a test class' questions: - module: common.questions.module - 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: common.questions.services - test: 'Do you want to generate a unit test class' + module: common.questions.module + 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: common.questions.services + 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' + 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 \ No newline at end of file diff --git a/translations/generate.entity.bundle.yml b/translations/generate.entity.bundle.yml index 211b421..ebd37c5 100644 --- a/translations/generate.entity.bundle.yml +++ b/translations/generate.entity.bundle.yml @@ -2,12 +2,19 @@ description: 'Generate a new content type (node / entity bundle)' help: 'Use: generate:contenttype to create a new content type name with the machine name of fancy and the human-readable name of Fancy.' welcome: 'Welcome to the Drupal Content Type generator' options: - module: common.options.module - bundle-name: 'The content type''s machine name' - bundle-title: 'The content type''s human-readable name' + module: common.options.module + bundle-name: 'The content type''s machine name' + bundle-title: 'The content type''s human-readable name' questions: - module: common.questions.module - bundle-name: 'Enter the machine name of your new content type' - bundle-title: 'Enter the human-readable name of your new content type' + module: common.questions.module + bundle-name: 'Enter the machine name of your new content type' + bundle-title: 'Enter the human-readable name of your new content type' message: - error-state1: placeholder + error-state1: placeholder +examples: + - description: 'Generate bundle entity specifying the module, the bundle name and its title' + execution: | + drupal generate:entity:bundle \ + --module="modulename" \ + --bundle-name="default" \ + --bundle-title="default" \ No newline at end of file diff --git a/translations/generate.entity.config.yml b/translations/generate.entity.config.yml index f234efe..4b5e719 100644 --- a/translations/generate.entity.config.yml +++ b/translations/generate.entity.config.yml @@ -1,16 +1,25 @@ description: 'Generate a new config entity' help: '' options: - module: common.options.module - entity-class: 'The config entity class' - entity-name: 'The config entity name' - label: 'The label' - bundle-of: 'Acts as bundle for content entities' - base-path: 'The base-path for the config entity routes' + module: common.options.module + entity-class: 'The config entity class' + entity-name: 'The config entity name' + label: 'The label' + bundle-of: 'Acts as bundle for content entities' + base-path: 'The base-path for the config entity routes' questions: - module: common.questions.module - entity-class: 'Enter the class of your new config entity' - entity-name: 'Enter the name of your new config entity' - label: 'Enter the label of your new config entity' - bundle-of: 'Name of the content entity you want this (config) entity to act as a bundle for' - base-path: 'Enter the base-path for the config entity routes' + module: common.questions.module + entity-class: 'Enter the class of your new config entity' + entity-name: 'Enter the name of your new config entity' + label: 'Enter the label of your new config entity' + bundle-of: 'Name of the content entity you want this (config) entity to act as a bundle for' + base-path: 'Enter the base-path for the config entity routes' +examples: + - description: 'Generate config entity specifying the module, the entity class, the entity name, its path and label' + execution: | + drupal generate:entity:config \ + --module="modulename" \ + --entity-class="DefaultEntity" \ + --entity-name="default_entity" \ + --base-path="/admin/structure" \ + --label="Default entity" \ No newline at end of file diff --git a/translations/generate.entity.content.yml b/translations/generate.entity.content.yml index 63ed3c4..4e4e908 100644 --- a/translations/generate.entity.content.yml +++ b/translations/generate.entity.content.yml @@ -1,19 +1,38 @@ description: 'Generate a new content entity' help: '' options: - module: common.options.module - entity-class: 'The content entity class' - entity-name: 'The content entity name' - label: 'The label' - has-bundles: 'Entity has bundles' - base-path: 'The base-path for the content entity routes' - is-translatable: 'Content entity translatable' + module: common.options.module + entity-class: 'The content entity class' + entity-name: 'The content entity name' + label: 'The label' + has-bundles: 'Entity has bundles' + base-path: 'The base-path for the content entity routes' + is-translatable: 'Content entity translatable' questions: - module: common.questions.module - entity-class: 'Enter the class of your new content entity' - entity-name: 'Enter the machine name of your new content entity' - label: 'Enter the label of your new content entity' - has-bundles: 'Do you want this (content) entity to have bundles' - base-path: 'Enter the base-path for the content entity routes' - is-translatable: 'Is your entity translatable' - revisionable: 'Is your entity revisionable' + module: common.questions.module + entity-class: 'Enter the class of your new content entity' + entity-name: 'Enter the machine name of your new content entity' + label: 'Enter the label of your new content entity' + has-bundles: 'Do you want this (content) entity to have bundles' + base-path: 'Enter the base-path for the content entity routes' + is-translatable: 'Is your entity translatable' + revisionable: 'Is your entity revisionable' +examples: + - description: 'Generate a content entity specifying the module, the entity class, the entity name, its path and label' + execution: | + drupal generate:entity:content \ + --module="modulename" \ + --entity-class="DefaultEntity" \ + --entity-name="default_entity" \ + --base-path="/admin/structure" \ + --label="Default entity" + - description: 'Generate a translatable and revisionable content entity specifying the module, the entity class, the entity name, its path and label' + execution: | + drupal generate:entity:content \ + --module="modulename" \ + --entity-class="DefaultEntity" \ + --entity-name="default_entity" \ + --base-path="/admin/structure" \ + --label="Default entity" \ + --is-translatable \ + --revisionable \ No newline at end of file diff --git a/translations/generate.event.subscriber.yml b/translations/generate.event.subscriber.yml index 97ff9bc..23233ba 100644 --- a/translations/generate.event.subscriber.yml +++ b/translations/generate.event.subscriber.yml @@ -1,4 +1,12 @@ description: 'Generate an event subscriber' questions: - class: 'Class name' - callback-name: 'Callback function name to handle event' + class: 'Class name' + callback-name: 'Callback function name to handle event' +examples: + - description: 'Generate an event subscriber specifying the module name, its name, the class and the events to subscribe' + execution: | + drupal generate:event:subscriber \ + --module="modulename" \ + --name="modulename.default" \ + --class="DefaultSubscriber" \ + --events='kernel_request' diff --git a/translations/generate.form.alter.yml b/translations/generate.form.alter.yml index dfcf577..b5d359a 100644 --- a/translations/generate.form.alter.yml +++ b/translations/generate.form.alter.yml @@ -1,9 +1,20 @@ description: 'Generate an implementation of hook_form_alter() or hook_form_FORM_ID_alter' help: 'The "%s" command helps you generate a new "%s"' options: - form-id: 'Form ID to alter' + form-id: 'Form ID to alter' messages: - inputs: "You can add form fields to modify form.\nThis is optional, press enter to continue" - loading-forms: Loading forms definition from Webprofiler module - hide-form-elements: 'Optionally you can select form items for hide' - help-already-implemented: 'The hook form alter was already implemented in module "%s"' + inputs: "You can add form fields to modify form.\nThis is optional, press enter to continue" + loading-forms: Loading forms definition from Webprofiler module + hide-form-elements: 'Optionally you can select form items for hide' + help-already-implemented: 'The hook form alter was already implemented in module "%s"' +examples: + - description: 'Generate a hook form alter for an empty form specifying the module name' + execution: | + drupal generate:form:alter \ + --module="modulename" + - description: 'Generate a hook form alter with 2 fields specifying the module name and the inputs' + 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":""' \ No newline at end of file diff --git a/translations/generate.form.yml b/translations/generate.form.yml index e18ad8e..0eadafb 100644 --- a/translations/generate.form.yml +++ b/translations/generate.form.yml @@ -2,24 +2,42 @@ description: 'Generate a new "%s"' help: 'The "%s" command helps you generate a new "%s"' welcome: 'Welcome to the Drupal form generator' options: - module: common.options.module - class: 'The form class name' - form-id: 'The Form id' - services: common.options.services - config-file: 'Add a config file' - inputs: common.options.inputs - path: 'Enter the form path' - menu-link-gen: 'Generate a menu link' - menu-link-title: 'A title for the menu link' - menu-parent: 'Menu parent' - menu-link-desc: 'A description for the menu link' + module: common.options.module + class: 'The form class name' + form-id: 'The Form id' + services: common.options.services + config-file: 'Add a config file' + inputs: common.options.inputs + path: 'Enter the form path' + menu-link-gen: 'Generate a menu link' + menu-link-title: 'A title for the menu link' + menu-parent: 'Menu parent' + menu-link-desc: 'A description for the menu link' questions: - module: common.questions.module - class: 'Enter the Form Class name' - form-id: 'Enter the Form id' - services: common.questions.services - config-file: 'Do you want to generate a config file' - inputs: common.questions.inputs - routing: 'Would you like to register a route for this form' - path: 'Enter the route path' - + module: common.questions.module + class: 'Enter the Form Class name' + form-id: 'Enter the Form id' + services: common.questions.services + config-file: 'Do you want to generate a config file' + inputs: common.questions.inputs + routing: 'Would you like to register a route for this form' + path: 'Enter the route path' +examples: + - description: 'Generate an empty form with config file specifying the module name, the class, a form id and the path' + execution: | + drupal generate:form \ + --module="modulename" \ + --class="DefaultForm" \ + --form-id="default_form" \ + --config-file \ + --path="/modulename/form/default" + - description: 'Generate a form with 2 fields and a config file specifying the module name, the class, a form id, the inputs and the path' + execution: | + drupal generate:form \ + --module="modulename" \ + --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":""' \ + --path="/modulename/form/default" \ No newline at end of file diff --git a/translations/generate.help.yml b/translations/generate.help.yml index a3560db..0713cda 100644 --- a/translations/generate.help.yml +++ b/translations/generate.help.yml @@ -3,4 +3,10 @@ help: 'The "%s" command helps you generate a hook help "%s"' options: questions: messages: - help-already-implemented: 'The hook help was already implemented in module "%s"' + help-already-implemented: 'The hook help was already implemented in module "%s"' +examples: + - description: 'Generate a hook help specifying the module name and the description' + execution: | + drupal generate:help \ + --module="modulename" \ + --description="My Awesome Module" \ No newline at end of file diff --git a/translations/generate.module.file.yml b/translations/generate.module.file.yml index e61f931..c54d3a0 100644 --- a/translations/generate.module.file.yml +++ b/translations/generate.module.file.yml @@ -2,6 +2,11 @@ description: 'Generate a .module file' help: 'The generate:module:file command helps you to generate a new .module file' welcome: 'Welcome to the Drupal module generator' options: - module: 'The Module name' + module: 'The Module name' questions: - module: 'Enter the new module name' + module: 'Enter the new module name' +examples: + - description: 'Generate the .module file specifying the module name' + execution: | + drupal generate:module:file \ + --module="modulename" \ No newline at end of file diff --git a/translations/generate.module.yml b/translations/generate.module.yml index 733a6bf..3f08046 100644 --- a/translations/generate.module.yml +++ b/translations/generate.module.yml @@ -2,34 +2,48 @@ description: 'Generate a module.' help: 'The generate:module command helps you generates a new module.' welcome: 'Welcome to the Drupal module generator' options: - module: 'The Module name' - machine-name: 'The machine name (lowercase and underscore only)' - module-path: 'The path of the module' - description: 'Module description' - core: 'Core version' - features-bundle: 'Define module as feature using the given Features bundle name' - package: 'Module package' - module-file: 'Add a .module file' - composer: 'Add a composer.json file' - dependencies: 'Module dependencies separated by commas (i.e. context, panels)' - test: 'Generate a test class' - twigtemplate: 'Generate theme template' + module: 'The Module name' + machine-name: 'The machine name (lowercase and underscore only)' + module-path: 'The path of the module' + description: 'Module description' + core: 'Core version' + features-bundle: 'Define module as feature using the given Features bundle name' + package: 'Module package' + module-file: 'Add a .module file' + composer: 'Add a composer.json file' + dependencies: 'Module dependencies separated by commas (i.e. context, panels)' + test: 'Generate a test class' + twigtemplate: 'Generate theme template' questions: - module: 'Enter the new module name' - machine-name: 'Enter the module machine name' - module-path: 'Enter the module Path' - description: 'Enter module description' - core: 'Enter Drupal Core version' - package: 'Enter package name' - features-support: 'Define module as feature' - features-bundle: 'Enter Features bundle name' - module-file: 'Do you want to generate a .module file' - composer: 'Do you want to add a composer.json file to your module' - dependencies: 'Would you like to add module dependencies' - test: 'Do you want to generate a unit test class' - twigtemplate: 'Do you want to generate a themeable template' + module: 'Enter the new module name' + machine-name: 'Enter the module machine name' + module-path: 'Enter the module Path' + description: 'Enter module description' + core: 'Enter Drupal Core version' + package: 'Enter package name' + features-support: 'Define module as feature' + features-bundle: 'Enter Features bundle name' + module-file: 'Do you want to generate a .module file' + composer: 'Do you want to add a composer.json file to your module' + dependencies: 'Would you like to add module dependencies' + test: 'Do you want to generate a unit test class' + twigtemplate: 'Do you want to generate a themeable template' warnings: - module-unavailable: 'Warning The following modules are not already available in your local environment "%s"' + module-unavailable: 'Warning The following modules are not already available in your local environment "%s"' errors: - invalid-core: 'The core version "%s" is invalid.' - directory-exists: 'The target directory "%s" is not empty.' + invalid-core: 'The core version "%s" is invalid.' + directory-exists: 'The target directory "%s" is not empty.' +examples: + - description: 'Generate a module specifying the module name, machine name, the path, its description, drupal core and the package name. In this example the composer file, the unit test and twig template are generated too' + execution: | + drupal generate:module \ + --module="modulename" \ + --machine-name="modulename" \ + --module-path="/modules/custom" \ + --description="My Awesome Module" \ + --core="8.x" \ + --package="Custom" \ + --module-file \ + --composer \ + --test \ + --twigtemplate \ No newline at end of file diff --git a/translations/generate.plugin.block.yml b/translations/generate.plugin.block.yml index dec87a8..039ea25 100644 --- a/translations/generate.plugin.block.yml +++ b/translations/generate.plugin.block.yml @@ -2,21 +2,31 @@ description: 'Generate a plugin block' help: 'The generate:plugin:block 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: 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' 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: 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.' messages: - inputs: "\nYou can add input fields to create special configurations in the block.\nThis is optional, press enter to continue" - invalid-theme-region: 'Region "%s" is invalid' + inputs: "\nYou can add input fields to create special configurations in the block.\nThis is optional, press enter to continue" + 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 diff --git a/translations/generate.plugin.ckeditorbutton.yml b/translations/generate.plugin.ckeditorbutton.yml index 0eb5bd6..aab459c 100644 --- a/translations/generate.plugin.ckeditorbutton.yml +++ b/translations/generate.plugin.ckeditorbutton.yml @@ -2,16 +2,26 @@ description: 'Generate CKEditor button plugin.' help: 'The generate:plugin:ckeditorbutton command helps you generate a new CKEditor button plugin.' welcome: 'Welcome to the Drupal CKEditor Button Plugin generator' options: - module: common.options.module - class: 'Plugin class name' - label: 'Plugin label' - plugin-id: 'Plugin ID. NOTE: This corresponds to the CKEditor plugin name. It is the first argument of the CKEDITOR.plugins.add() function in the plugin.js file.' - button-name: 'Button name. NOTE: This corresponds to the CKEditor button name. They are the first argument of the editor.ui.addButton() or editor.ui.addRichCombo() functions in the plugin.js file.' - button-icon-path: 'Button icon path. This is the path to the icon/image of the button.' + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin ID. NOTE: This corresponds to the CKEditor plugin name. It is the first argument of the CKEDITOR.plugins.add() function in the plugin.js file.' + button-name: 'Button name. NOTE: This corresponds to the CKEditor button name. They are the first argument of the editor.ui.addButton() or editor.ui.addRichCombo() functions in the plugin.js file.' + button-icon-path: 'Button icon path. This is the path to the icon/image of the button.' questions: - module: common.questions.module - class: 'Enter the plugin class name' - label: 'Enter the plugin label' - plugin-id: 'Enter the plugin ID. NOTE: This corresponds to the CKEditor plugin name. It is the first argument of the CKEDITOR.plugins.add() function in the plugin.js file.' - button-name: 'Enter the button name. NOTE: This corresponds to the CKEditor button name. They are the first argument of the editor.ui.addButton() or editor.ui.addRichCombo() functions in the plugin.js file.' - button-icon-path: 'Enter the button icon path' + module: common.questions.module + class: 'Enter the plugin class name' + label: 'Enter the plugin label' + plugin-id: 'Enter the plugin ID. NOTE: This corresponds to the CKEditor plugin name. It is the first argument of the CKEDITOR.plugins.add() function in the plugin.js file.' + button-name: 'Enter the button name. NOTE: This corresponds to the CKEditor button name. They are the first argument of the editor.ui.addButton() or editor.ui.addRichCombo() functions in the plugin.js file.' + button-icon-path: 'Enter the button icon path' +examples: + - description: 'Generate CKEditor button specifying the module name, the class, the label, its id, the button name and the icon path' + execution: | + drupal generate:plugin:ckeditorbutton \ + --module="modulename" \ + --class="DefaultCKEditorButton" \ + --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" \ No newline at end of file From 7ed250f83d12c5b159771eb28ab1efd2cad1037f Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Tue, 11 Jul 2017 11:53:04 -0500 Subject: [PATCH 04/14] Adding generate commands examples --- translations/generate.plugin.condition.yml | 63 +++++++++--- translations/generate.plugin.field.yml | 74 ++++++++------ .../generate.plugin.fieldformatter.yml | 29 ++++-- translations/generate.plugin.fieldtype.yml | 47 ++++++--- translations/generate.plugin.fieldwidget.yml | 29 ++++-- translations/generate.plugin.imageeffect.yml | 29 ++++-- .../generate.plugin.imageformatter.yml | 24 +++-- translations/generate.plugin.mail.yml | 32 +++--- .../generate.plugin.migrate.process.yml | 9 +- .../generate.plugin.migrate.source.yml | 53 +++++++--- .../generate.plugin.rest.resource.yml | 36 ++++--- translations/generate.plugin.rulesaction.yml | 55 +++++++---- translations/generate.plugin.skeleton.yml | 23 +++-- .../generate.plugin.type.annotation.yml | 24 +++-- translations/generate.plugin.type.yaml.yml | 24 +++-- translations/generate.plugin.views.field.yml | 22 +++-- translations/generate.post.update.yml | 14 ++- translations/generate.profile.yml | 37 ++++--- translations/generate.routesubscriber.yml | 19 ++-- translations/generate.service.yml | 45 ++++++--- translations/generate.theme.yml | 98 ++++++++++++------- translations/generate.twig.extension.yml | 11 ++- translations/generate.update.yml | 12 ++- 23 files changed, 544 insertions(+), 265 deletions(-) diff --git a/translations/generate.plugin.condition.yml b/translations/generate.plugin.condition.yml index 1ef1bea..e06c7e8 100644 --- a/translations/generate.plugin.condition.yml +++ b/translations/generate.plugin.condition.yml @@ -2,20 +2,51 @@ description: 'Generate a plugin condition.' help: 'The generate:plugin:conditon command helps you generate a plugin condition.' welcome: 'Welcome to the Drupal Plugin Condition generator' options: - module: common.options.module - class: 'Plugin condition class name' - label: 'Plugin condition label' - plugin-id: 'Plugin condition id' - context-definition-id: 'Context definition ID' - context-definition-label: 'Context definition label' - context-definition-required: 'Context definition is required (TRUE/FALSE)' + module: common.options.module + class: 'Plugin condition class name' + label: 'Plugin condition label' + plugin-id: 'Plugin condition id' + context-definition-id: 'Context definition ID' + context-definition-label: 'Context definition label' + context-definition-required: 'Context definition is required (TRUE/FALSE)' questions: - module: common.questions.module - class: 'Enter the plugin condition class name' - label: 'Enter the plugin condition label' - plugin-id: 'Enter the plugin condition id' - context-type: 'Context type' - context-entity-type: 'Context entity type' - context-definition-id: 'Context definition ID' - context-definition-label: 'Context definition label' - context-definition-required: 'Context definition is required' + module: common.questions.module + class: 'Enter the plugin condition class name' + label: 'Enter the plugin condition label' + plugin-id: 'Enter the plugin condition id' + context-type: 'Context type' + context-entity-type: 'Context entity type' + context-definition-id: 'Context definition ID' + context-definition-label: 'Context definition label' + context-definition-required: 'Context definition is required' +examples: + - description: 'Generate a plugin condition for a node entity type specifying the module name, the class, the label, its id and the context definition' + execution: | + drupal generate:plugin:condition \ + --module="modulename" \ + --class="ExampleCondition" \ + --label="Example condition" \ + --plugin-id="example_condition" \ + --context-definition-id="entity:node" \ + --context-definition-label="node" \ + --context-definition-required + - description: 'Generate a plugin condition for language specifying the module name, the class, the label, its id and the context definition' + execution: | + drupal generate:plugin:condition \ + --module="modulename" \ + --class="ExampleCondition" \ + --label="Example condition" \ + --plugin-id="example_condition" \ + --context-definition-id="language" \ + --context-definition-label="Language" \ + --context-definition-required + - description: 'Generate a plugin condition for role configuration specifying the module name, the class, the label, its id and the context definition' + execution: | + drupal generate:plugin:condition \ + --module="modulename" \ + --class="ExampleCondition" \ + --label="Example condition" \ + --plugin-id="example_condition" \ + --context-definition-id="entity:user_role" \ + --context-definition-label="user_role" \ + --context-definition-required diff --git a/translations/generate.plugin.field.yml b/translations/generate.plugin.field.yml index a5d54b5..0941fce 100644 --- a/translations/generate.plugin.field.yml +++ b/translations/generate.plugin.field.yml @@ -2,32 +2,50 @@ description: 'Generate field type, widget and formatter plugins.' help: 'The generate:plugin:field command helps you generate a full set of field plugin: field type, field formatter and field widget.' welcome: 'Welcome to the Drupal Field Plugin generator' options: - module: common.options.module - type-class: 'Field type plugin class name' - type-label: 'Field type plugin label' - type-plugin-id: 'Field type plugin id' - type-description: 'Field type plugin description' - formatter-class: 'Field formatter plugin class name' - formatter-label: 'Field formatter plugin label' - formatter-plugin-id: 'Field formatter plugin id' - widget-class: 'Field widget plugin class name' - widget-label: 'Field widget plugin label' - widget-plugin-id: 'Field widget plugin id' - field-type: 'Field type the formatter and widget plugin can be used with' - default-widget: 'Default field widget of the field type plugin' - default-formatter: 'Default field formatter of field type plugin' + module: common.options.module + type-class: 'Field type plugin class name' + type-label: 'Field type plugin label' + type-plugin-id: 'Field type plugin id' + type-description: 'Field type plugin description' + formatter-class: 'Field formatter plugin class name' + formatter-label: 'Field formatter plugin label' + formatter-plugin-id: 'Field formatter plugin id' + widget-class: 'Field widget plugin class name' + widget-label: 'Field widget plugin label' + widget-plugin-id: 'Field widget plugin id' + field-type: 'Field type the formatter and widget plugin can be used with' + default-widget: 'Default field widget of the field type plugin' + default-formatter: 'Default field formatter of field type plugin' questions: - module: common.questions.module - type-class: 'Field type plugin class name' - type-label: 'Enter the field type plugin label' - type-plugin-id: 'Enter the field type plugin id' - type-description: 'Enter the field type plugin description' - formatter-class: 'Enter the field formatter plugin class name' - formatter-label: 'Enter the field formatter plugin label' - formatter-plugin-id: 'Enter the field formatter plugin id' - widget-class: 'Enter the field widget plugin class name' - widget-label: 'Enter the field widget plugin label' - widget-plugin-id: 'Enter the field widget plugin id' - field-type: 'Enter the field type the formatter and widget plugin can be used with' - default-widget: 'Enter the default field widget of the field type plugin' - default-formatter: 'Enter the default field formatter of field type plugin' + module: common.questions.module + type-class: 'Field type plugin class name' + type-label: 'Enter the field type plugin label' + type-plugin-id: 'Enter the field type plugin id' + type-description: 'Enter the field type plugin description' + formatter-class: 'Enter the field formatter plugin class name' + formatter-label: 'Enter the field formatter plugin label' + formatter-plugin-id: 'Enter the field formatter plugin id' + widget-class: 'Enter the field widget plugin class name' + widget-label: 'Enter the field widget plugin label' + widget-plugin-id: 'Enter the field widget plugin id' + field-type: 'Enter the field type the formatter and widget plugin can be used with' + default-widget: 'Enter the default field widget of the field type plugin' + default-formatter: 'Enter the default field formatter of field type plugin' +examples: + - description: 'Generate field type, widget and formatter plugins specifying the module name, the type (class, label, plugin id and description), the formatter (class, label, plugin id) and the widget (class, label and plugin id)' + execution: | + drupal generate:plugin:field \ + --module="modulename" \ + --type-class="ExampleFieldType" \ + --type-label="Example field type" \ + --type-plugin-id="example_field_type" \ + --type-description="My Field Type" \ + --formatter-class="ExampleFormatterType" \ + --formatter-label="Example formatter type" \ + --formatter-plugin-id="example_formatter_type" \ + --widget-class="ExampleWidgetType" \ + --widget-label="Example widget type" \ + --widget-plugin-id="example_widget_type" \ + --field-type="example_field_type" \ + --default-widget="example_widget_type" \ + --default-formatter="example_formatter_type" diff --git a/translations/generate.plugin.fieldformatter.yml b/translations/generate.plugin.fieldformatter.yml index a47e9b7..bb7d2d9 100644 --- a/translations/generate.plugin.fieldformatter.yml +++ b/translations/generate.plugin.fieldformatter.yml @@ -2,14 +2,23 @@ description: 'Generate field formatter plugin.' help: 'The generate:plugin:fieldformatter command helps you generate a new field formatter plugin.' welcome: 'Welcome to the Drupal Field Formatter Plugin generator' options: - module: common.options.module - class: 'Plugin class name' - label: 'Plugin label' - plugin-id: 'Plugin id' - field-type: 'Field type the plugin can be used with' + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin id' + field-type: 'Field type the plugin can be used with' questions: - module: common.questions.module - class: 'Enter the plugin class name' - label: 'Enter the plugin label' - plugin-id: 'Enter the plugin id' - field-type: 'Enter the field type the plugin can be used with' + module: common.questions.module + class: 'Enter the plugin class name' + label: 'Enter the plugin label' + plugin-id: 'Enter the plugin id' + field-type: 'Enter the field type the plugin can be used with' +examples: + - description: 'Generate a a text field formatter plugin specifying the module name, the class, the label its plugin id and the field type' + execution: | + drupal generate:plugin:fieldformatter \ + --module="modulename" \ + --class="ExampleFieldFormatter" \ + --label="Example field formatter" \ + --plugin-id="example_field_formatter" \ + --field-type="text" diff --git a/translations/generate.plugin.fieldtype.yml b/translations/generate.plugin.fieldtype.yml index 48261de..c3bfae8 100644 --- a/translations/generate.plugin.fieldtype.yml +++ b/translations/generate.plugin.fieldtype.yml @@ -2,18 +2,37 @@ description: 'Generate field type plugin.' help: 'The generate:plugin:fieldtype command helps you generate a new field type plugin.' welcome: 'Welcome to the Drupal Field Type Plugin generator' options: - module: common.options.module - class: 'Plugin class name' - label: 'Plugin label' - plugin-id: 'Plugin id' - description: 'Plugin Description' - default-widget: 'Default field widget of this plugin' - default-formatter: 'Default field formatter of this plugin' + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin id' + description: 'Plugin Description' + default-widget: 'Default field widget of this plugin' + default-formatter: 'Default field formatter of this plugin' questions: - module: common.questions.module - class: 'Enter the plugin class name' - label: 'Enter the plugin label' - plugin-id: 'Enter the plugin id' - description: 'Enter the plugin Description' - default-widget: 'Enter the default field widget of this plugin' - default-formatter: 'Enter the default field formatter of this plugin' + module: common.questions.module + class: 'Enter the plugin class name' + label: 'Enter the plugin label' + plugin-id: 'Enter the plugin id' + description: 'Enter the plugin Description' + default-widget: 'Enter the default field widget of this plugin' + default-formatter: 'Enter the default field formatter of this plugin' +examples: + - description: 'Generate a field type plugin specifying the module name, the class, its label, the plugin id and a description' + execution: | + drupal generate:plugin:fieldtype \ + --module="modulename" \ + --class="ExampleFieldType" \ + --label="Example field type" \ + --plugin-id="example_field_type" \ + --description="My Field Type" + - description: 'Generate a field type plugin with a default widget and formatter specifying the module name, the class, its label, the plugin id and a description' + execution: | + drupal generate:plugin:fieldtype \ + --module="modulename" \ + --class="ExampleFieldType" \ + --label="Example field type" \ + --plugin-id="example_field_type" \ + --description="My Field Type" \ + --default-widget="DefaultWidget" \ + --default-formatter="DefaultFormatter" diff --git a/translations/generate.plugin.fieldwidget.yml b/translations/generate.plugin.fieldwidget.yml index 9aef32f..fb762cd 100644 --- a/translations/generate.plugin.fieldwidget.yml +++ b/translations/generate.plugin.fieldwidget.yml @@ -2,14 +2,23 @@ description: 'Generate field widget plugin.' help: 'The generate:plugin:fieldwidget command helps you generate a new field widget plugin.' welcome: 'Welcome to the Drupal Field Widget Plugin generator' options: - module: common.options.module - class: 'Plugin class name' - label: 'Plugin label' - plugin-id: 'Plugin id' - field-type: 'Field type the plugin can be used with' + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin id' + field-type: 'Field type the plugin can be used with' questions: - module: common.questions.module - class: 'Enter the plugin class name' - label: 'Enter the plugin label' - plugin-id: 'Enter the plugin id' - field-type: 'Enter the field type the plugin can be used with' + module: common.questions.module + class: 'Enter the plugin class name' + label: 'Enter the plugin label' + plugin-id: 'Enter the plugin id' + field-type: 'Enter the field type the plugin can be used with' +examples: + - description: 'Generate a text type field widget plugin specifying the module name, the class, its label, the plugin id and the field type' + execution: | + drupal generate:plugin:fieldwidget \ + --module="modulename" \ + --class="ExampleFieldWidget" \ + --label="Example field widget" \ + --plugin-id="example_field_widget" \ + --field-type="text" diff --git a/translations/generate.plugin.imageeffect.yml b/translations/generate.plugin.imageeffect.yml index ac83b21..226bac8 100644 --- a/translations/generate.plugin.imageeffect.yml +++ b/translations/generate.plugin.imageeffect.yml @@ -2,14 +2,23 @@ description: 'Generate image effect plugin.' help: 'The generate:plugin:imageeffect command helps you generate a new image effect plugin.' welcome: 'Welcome to the Drupal Image Effect Plugin generator' options: - module: common.options.module - class: 'Plugin class name' - label: 'Plugin label' - plugin-id: 'Plugin id' - description: 'Plugin Description' + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin id' + description: 'Plugin Description' questions: - module: common.questions.module - class: 'Enter the plugin class name' - label: 'Enter the plugin label' - plugin-id: 'Enter the plugin id' - description: 'Enter the plugin Description' + module: common.questions.module + class: 'Enter the plugin class name' + label: 'Enter the plugin label' + plugin-id: 'Enter the plugin id' + description: 'Enter the plugin Description' +examples: + - description: 'Generate a image effect plugin specifying the module name, the class, its label, the plugin id and a description' + execution: | + drupal generate:plugin:imageeffect \ + --module="modulename" \ + --class="DefaultImageEffect" \ + --label="Default image effect" \ + --plugin-id="default_image_effect" \ + --description="My Image Effect" diff --git a/translations/generate.plugin.imageformatter.yml b/translations/generate.plugin.imageformatter.yml index 32d62f8..f0c6522 100644 --- a/translations/generate.plugin.imageformatter.yml +++ b/translations/generate.plugin.imageformatter.yml @@ -1,12 +1,20 @@ description: 'Generate image formatter plugin.' help: 'The generate:plugin:imageformatter command helps you generate a new image formatter plugin.' options: - module: common.options.module - class: 'Plugin class name' - label: 'Plugin label' - plugin-id: 'Plugin id' + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin id' questions: - module: common.questions.module - class: 'Enter the plugin class name' - label: 'Enter the plugin label' - plugin-id: 'Enter the plugin id' + module: common.questions.module + class: 'Enter the plugin class name' + label: 'Enter the plugin label' + plugin-id: 'Enter the plugin id' +examples: + - description: 'Generate a image formatter plugin specifying the module name, the class, its label and the plugin id' + execution: | + drupal generate:plugin:imageformatter \ + --module="modulename" \ + --class="ExampleImageFormatter" \ + --label="Example image formatter" \ + --plugin-id="example_image_formatter" diff --git a/translations/generate.plugin.mail.yml b/translations/generate.plugin.mail.yml index 8eb2b44..99e8362 100644 --- a/translations/generate.plugin.mail.yml +++ b/translations/generate.plugin.mail.yml @@ -2,16 +2,24 @@ description: 'Generate a plugin mail' help: 'The generate:plugin:mail command helps you generate a new Plugin mail.' welcome: 'Welcome to the Drupal Plugin Mail 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 + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin id' + inputs: common.options.inputs + services: common.options.services 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 + 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 +examples: + - description: 'Generate an email plugin specifying the module name, the class, its label and the plugin id' + execution: | + drupal generate:plugin:mail \ + --module="modulename" \ + --class="HtmlFormatterMail" \ + --label="Html formatter mail" \ + --plugin-id="html_formatter_mail" diff --git a/translations/generate.plugin.migrate.process.yml b/translations/generate.plugin.migrate.process.yml index a7f3487..199e329 100644 --- a/translations/generate.plugin.migrate.process.yml +++ b/translations/generate.plugin.migrate.process.yml @@ -6,4 +6,11 @@ options: plugin-id: 'Plugin id' questions: class: 'Enter the migration process plugin class name' - plugin-id: 'Enter the migration process plugin id' \ No newline at end of file + plugin-id: 'Enter the migration process plugin id' +examples: + - description: 'Generate a migration plugin process specifying the module name, the class and its id' + execution: | + drupal generate:plugin:migrate:process \ + --module="modulename" \ + --class="MigrationProcess" \ + --plugin-id="migrationprocess" diff --git a/translations/generate.plugin.migrate.source.yml b/translations/generate.plugin.migrate.source.yml index 5faa228..e7b7f2b 100644 --- a/translations/generate.plugin.migrate.source.yml +++ b/translations/generate.plugin.migrate.source.yml @@ -2,20 +2,41 @@ description: 'Generate a migrate source plugin' help: 'The generate:migrate:plugin:source command helps you generate a new migrate source plugin.' welcome: 'Welcome to the Drupal Migrate Source Plugin generator' options: - module: common.options.module - class: 'Plugin class name' - plugin-id: 'Plugin id' - table: 'Table to query' - alias: 'Short alias to refer to the table as' - group-by: 'Field to group results by' - fields: 'Fields to export' + module: common.options.module + class: 'Plugin class name' + plugin-id: 'Plugin id' + table: 'Table to query' + alias: 'Short alias to refer to the table as' + group-by: 'Field to group results by' + fields: 'Fields to export' questions: - module: common.questions.module - class: 'Enter the plugin class name' - plugin-id: 'Enter the plugin id' - table: 'Enter the table name' - alias: 'Enter the alias for the table' - group-by: 'Enter a field to group by if desired' - fields: - id: 'Enter the field id or press enter if done' - description: 'Enter the field description' + module: common.questions.module + class: 'Enter the plugin class name' + plugin-id: 'Enter the plugin id' + table: 'Enter the table name' + alias: 'Enter the alias for the table' + group-by: 'Enter a field to group by if desired' + fields: + id: 'Enter the field id or press enter if done' + description: 'Enter the field description' +examples: + - description: 'Generate a migration source plugin specifying the module name, the class, its plugin id, the table and its alias' + execution: | + drupal generate:plugin:migrate:source \ + --module="modulename" \ + --class="PluginClassName" \ + --plugin-id="plugin_class_name" \ + --table="DefaultTableName" \ + --alias="D" + - description: 'Generate a migration source plugin for specific fields of the users table specifying the module name, the class, its plugin id, the table, its alias and the fields' + execution: | + drupal generate:plugin:migrate:source \ + --module="modulename" \ + --class="DefaultPluginClass" \ + --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"' diff --git a/translations/generate.plugin.rest.resource.yml b/translations/generate.plugin.rest.resource.yml index 15f4353..19e1e3f 100644 --- a/translations/generate.plugin.rest.resource.yml +++ b/translations/generate.plugin.rest.resource.yml @@ -2,18 +2,28 @@ description: 'Generate plugin rest resource' help: 'The generate:plugin:rest:resource command helps you generate a new rest resource.' welcome: 'Welcome to the Drupal Plugin Rest Resource generator' options: - module: common.options.module - class: 'Plugin Rest Resource class' - plugin-id: 'Plugin Rest Resource id' - plugin-label: 'Plugin Rest Resource Label' - plugin-url: 'Plugin Rest Resource URL' - plugin-states: 'Plugin Rest Resource States' + module: common.options.module + class: 'Plugin Rest Resource class' + plugin-id: 'Plugin Rest Resource id' + plugin-label: 'Plugin Rest Resource Label' + plugin-url: 'Plugin Rest Resource URL' + plugin-states: 'Plugin Rest Resource States' questions: - module: common.questions.module - class: 'Enter the plugin rest resource name' - plugin-id: 'Enter the plugin rest resource id' - plugin-label: 'Enter the plugin rest resource label' - plugin-url: 'Enter the plugin rest resource url' - plugin-states: 'Please select what REST States implement in your resource (GET is selected by default)' + module: common.questions.module + class: 'Enter the plugin rest resource name' + plugin-id: 'Enter the plugin rest resource id' + plugin-label: 'Enter the plugin rest resource label' + plugin-url: 'Enter the plugin rest resource url' + plugin-states: 'Please select what REST States implement in your resource (GET is selected by default)' messages: - selected-states: 'States selected' + selected-states: 'States selected' +examples: + - description: 'Generate a rest resource plugin using GET specifying the module name, the class, the plugin id, its label, the target url and the request type' + execution: | + drupal generate:plugin:rest:resource \ + --module="modulename" \ + --class="DefaultRestResource" \ + --plugin-id="default_rest_resource" \ + --plugin-label="Default rest resource" \ + --plugin-url="http://rest.resources.example.com" \ + --plugin-states='GET' diff --git a/translations/generate.plugin.rulesaction.yml b/translations/generate.plugin.rulesaction.yml index 3da18b6..466a562 100644 --- a/translations/generate.plugin.rulesaction.yml +++ b/translations/generate.plugin.rulesaction.yml @@ -2,21 +2,42 @@ description: 'Generate a plugin rule action' help: 'The generate:plugin:rulesaction command helps you generate a new Plugin rule action.' welcome: 'Welcome to the Drupal Plugin Rules Action 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 - category: 'Plugin category' - context: 'Plugin context' - type: 'Action Type (user or node)' + module: common.options.module + class: 'Plugin class name' + label: 'Plugin label' + plugin-id: 'Plugin id' + inputs: common.options.inputs + services: common.options.services + category: 'Plugin category' + context: 'Plugin context' + type: 'Action Type (user or node)' 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 - category: 'Enter plugin category' - context: 'Enter plugin context' + 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 + category: 'Enter plugin category' + context: 'Enter plugin context' +examples: + - description: 'Generate a user 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:rulesaction \ + --module="modulename" \ + --class="DefaultAction" \ + --label="Default action" \ + --plugin-id="default_action" \ + --type="user" \ + --category="default_action" \ + --context="default_action" + - description: 'Generate a node 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:rulesaction \ + --module="modulename" \ + --class="DefaultAction" \ + --label="Default action" \ + --plugin-id="default_action" \ + --type="node" \ + --category="default_action" \ + --context="default_action" diff --git a/translations/generate.plugin.skeleton.yml b/translations/generate.plugin.skeleton.yml index 084ba5e..4a75529 100644 --- a/translations/generate.plugin.skeleton.yml +++ b/translations/generate.plugin.skeleton.yml @@ -1,13 +1,20 @@ description: 'Generate an implementation of a skeleton plugin' help: 'The "%s" command helps you generate a skeleton plugin "%s".' options: - module: common.options.module - plugin: 'The Plugin Id.' - class: 'Plugin class name' + module: common.options.module + plugin: 'The Plugin Id.' + class: 'Plugin class name' questions: - module: common.questions.module - plugin: 'Enter the Plugin Id' - class: 'Enter the plugin class name' + module: common.questions.module + plugin: 'Enter the Plugin Id' + class: 'Enter the plugin class name' messages: - plugin-dont-exist: 'The plugin "%s" does not exist.' - plugin-generator-implemented: 'Plugin "%s" already has an advanced command generator, please use "%s"' + plugin-dont-exist: 'The plugin "%s" does not exist.' + plugin-generator-implemented: 'Plugin "%s" already has an advanced command generator, please use "%s"' +examples: + - description: 'Generate a plugin skeleton specifying module name, the plugin id and the class' + execution: | + drupal generate:plugin:skeleton \ + --module="modulename" \ + --plugin-id="link_relation_type" \ + --class="DefaultLinkRelationType" diff --git a/translations/generate.plugin.type.annotation.yml b/translations/generate.plugin.type.annotation.yml index 0ad7db9..4a4add3 100644 --- a/translations/generate.plugin.type.annotation.yml +++ b/translations/generate.plugin.type.annotation.yml @@ -2,12 +2,20 @@ description: 'Generate a plugin type with annotation discovery' help: 'The generate:plugin:type:annotation command helps you generate a new Plugin type that uses annotation discovery.' welcome: 'Welcome to the Drupal Plugin Type generator' options: - module: common.options.module - class: 'Plugin type class name' - machine-name: 'Plugin type machine name' - label: 'Plugin type label' + module: common.options.module + class: 'Plugin type class name' + machine-name: 'Plugin type machine name' + label: 'Plugin type label' questions: - module: common.questions.module - class: 'Enter the plugin type class name' - machine-name: 'Enter the plugin type machine name' - label: 'Enter the plugin type label' + module: common.questions.module + class: 'Enter the plugin type class name' + machine-name: 'Enter the plugin type machine name' + label: 'Enter the plugin type label' +examples: + - description: 'Generate a plugin with annotation discovery specifying module name, class name, machine name and label' + execution: | + drupal generate:plugin:type:annotation \ + --module="modulename" \ + --class="ExamplePlugin" \ + --machine-name="example_plugin" \ + --label="Example plugin" diff --git a/translations/generate.plugin.type.yaml.yml b/translations/generate.plugin.type.yaml.yml index f44ca53..9af0175 100644 --- a/translations/generate.plugin.type.yaml.yml +++ b/translations/generate.plugin.type.yaml.yml @@ -2,12 +2,20 @@ description: 'Generate a plugin type with Yaml discovery' help: 'The generate:plugin:type:yaml command helps you generate a new Plugin type that uses Yaml discovery.' welcome: 'Welcome to the Drupal Plugin Type generator' options: - module: common.options.module - class: 'Plugin type class name' - plugin-name: 'Plugin type machine name' - plugin-file-name: 'Plugin file name' + module: common.options.module + class: 'Plugin type class name' + plugin-name: 'Plugin type machine name' + plugin-file-name: 'Plugin file name' questions: - module: common.questions.module - class: 'Enter the plugin type class name' - plugin-name: 'Enter the plugin type machine name' - plugin-file-name: 'Enter the plugin file name (e.g. MODULE.plugin.filename.yml)' + module: common.questions.module + class: 'Enter the plugin type class name' + plugin-name: 'Enter the plugin type machine name' + plugin-file-name: 'Enter the plugin file name (e.g. MODULE.plugin.filename.yml)' +examples: + - description: 'Generate a plugin with Yaml discovery specifying module name, class name, plugin name and plugin file name' + execution: | + drupal generate:plugin:type:yaml \ + --module="modulename" \ + --class="ExamplePlugin" \ + --plugin-name="example_plugin" \ + --plugin-file-name="example.plugin" diff --git a/translations/generate.plugin.views.field.yml b/translations/generate.plugin.views.field.yml index 4542d07..e463a42 100644 --- a/translations/generate.plugin.views.field.yml +++ b/translations/generate.plugin.views.field.yml @@ -1,11 +1,19 @@ description: 'Generate a custom plugin view field.' help: 'The generate:plugin:views:field command helps you generate a new custom views field plugin.' options: - class: 'Views plugin field class name' - title: 'Views plugin field title' - description: 'Views plugin field description' + class: 'Views plugin field class name' + title: 'Views plugin field title' + description: 'Views plugin field description' questions: - class: 'Views plugin field class name' - title: 'Views plugin field title' - description: 'Views plugin field description' - description_default: 'My awesome custom views field plugin.' + class: 'Views plugin field class name' + title: 'Views plugin field title' + description: 'Views plugin field description' + description_default: 'My awesome custom views field plugin.' +examples: + - description: 'Generate a custom view field plugin specifying the module name, the class, a title and its description' + execution: | + drupal generate:plugin:views:field \ + --module="modulename" \ + --class="CustomViewsField" \ + --title="Custom views field" \ + --description="My awesome custom views field plugin." diff --git a/translations/generate.post.update.yml b/translations/generate.post.update.yml index 88d29d8..fce43d1 100644 --- a/translations/generate.post.update.yml +++ b/translations/generate.post.update.yml @@ -1,9 +1,15 @@ description: 'Generate an implementation of hook_post_update_NAME()' help: 'The "%s" command helps you generate a hook post update NAME "%s"' options: - post-update-name: 'Post Update Name' + post-update-name: 'Post Update Name' questions: - post-update-name: 'Please provide the Post Update Name to be implemeted' + post-update-name: 'Please provide the Post Update Name to be implemeted' messages: - wrong-post-update-name: 'The post update name "%s" is invalid' - post-update-name-already-implemented: 'The post update name "%s" was already implemented' + wrong-post-update-name: 'The post update name "%s" is invalid' + post-update-name-already-implemented: 'The post update name "%s" was already implemented' +examples: + - description: 'Generate an implementation of post update hook specifying the module name and the post update name' + execution: | + drupal generate:post:update \ + --module="modulename" \ + --post-update-name="PostUpdateName" diff --git a/translations/generate.profile.yml b/translations/generate.profile.yml index 93154a6..7250982 100644 --- a/translations/generate.profile.yml +++ b/translations/generate.profile.yml @@ -2,20 +2,29 @@ description: 'Generate a profile.' help: 'The generate:profile command helps you generate a new installation profile.' welcome: 'Welcome to the Drupal installation profile generator' options: - profile: 'The profile name' - machine-name: 'The machine name (lowercase and underscore only)' - description: 'Profile description' - core: 'Core version' - dependencies: 'Module dependencies separated by commas (i.e. context, panels)' - distribution: 'The distribution name' + profile: 'The profile name' + machine-name: 'The machine name (lowercase and underscore only)' + description: 'Profile description' + core: 'Core version' + dependencies: 'Module dependencies separated by commas (i.e. context, panels)' + distribution: 'The distribution name' questions: - profile: 'Enter the name of the new profile' - machine-name: 'Enter the machine name' - description: 'Enter the description' - core: 'Enter Drupal Core version' - dependencies: 'Would you like to add module dependencies?' - distribution: 'Is this install profile intended to be a distribution?' + profile: 'Enter the name of the new profile' + machine-name: 'Enter the machine name' + description: 'Enter the description' + core: 'Enter Drupal Core version' + dependencies: 'Would you like to add module dependencies?' + distribution: 'Is this install profile intended to be a distribution?' warnings: - module-unavailable: 'Warning: The following modules are not already available in your local environment "%s"' + module-unavailable: 'Warning: The following modules are not already available in your local environment "%s"' errors: - directory-exists: 'The target directory "%s" is not empty.' + directory-exists: 'The target directory "%s" is not empty.' +examples: + - description: 'Generate a profile specifying the profile name, the machine name, a description, the core and its module dependencies' + execution: | + drupal generate:profile \ + --profile="NewProfileName" \ + --machine-name="newprofilename" \ + --description="My Useful Profile" \ + --core="8.x" \ + --dependencies="modulename" diff --git a/translations/generate.routesubscriber.yml b/translations/generate.routesubscriber.yml index 7958c01..a0d4d62 100644 --- a/translations/generate.routesubscriber.yml +++ b/translations/generate.routesubscriber.yml @@ -2,10 +2,17 @@ description: 'Generate a RouteSubscriber' help: 'The generate:service command helps you generate a new RouteSubscriber.' welcome: 'Welcome to the Drupal RouteSubscriber generator.' options: - module: common.options.module - name: 'Service name' - class: 'Class name' + module: common.options.module + name: 'Service name' + class: 'Class name' questions: - module: common.questions.module - name: 'Enter the service name' - class: 'Enter the Class name' + module: common.questions.module + name: 'Enter the service name' + class: 'Enter the Class name' +examples: + - description: 'Generate a route subscriber specifying the module name, the route name and its class' + execution: | + drupal generate:routesubscriber \ + --module="modulename" \ + --name="modulename.route_subscriber" \ + --class="RouteSubscriber" diff --git a/translations/generate.service.yml b/translations/generate.service.yml index 247e5ef..adc1ed8 100644 --- a/translations/generate.service.yml +++ b/translations/generate.service.yml @@ -2,19 +2,36 @@ description: 'Generate service' help: 'The generate:service command helps you generate a new service.' welcome: 'Welcome to the Drupal service generator' options: - module: common.options.module - service-name: 'Service name' - class: 'Class name' - interface: Interface - services: common.questions.services - path: Path + module: common.options.module + service-name: 'Service name' + class: 'Class name' + interface: Interface + services: common.questions.services + path: Path questions: - module: common.questions.module - service-name: 'Enter the service name' - class: 'Enter the Class name' - interface: 'Create an interface' - interface-name: 'Enter the interface name' - services: common.options.services - path: 'Enter the path for the services' + module: common.questions.module + service-name: 'Enter the service name' + class: 'Enter the Class name' + interface: 'Create an interface' + interface-name: 'Enter the interface name' + services: common.options.services + path: 'Enter the path for the services' messages: - service-already-taken: 'The service name has been already taken in module "%s"' + service-already-taken: 'The service name has been already taken in module "%s"' +examples: + - description: 'Generate a services without interface specifying the module name, the service name, the class and its path' + execution: | + drupal generate:service \ + --module="modulename" \ + --name="modulename.default" \ + --class="DefaultService" \ + --path-service="/modules/custom/modulename/src/" + - description: 'Generate a services with interface specifying the module name, the service name, the class, the interface name and its path' + execution: | + drupal generate:service \ + --module="modulename" \ + --name="modulename.default" \ + --class="DefaultService" \ + --interface \ + --interface-name="InterfaceName" \ + --path-service="/modules/custom/modulename/src/" diff --git a/translations/generate.theme.yml b/translations/generate.theme.yml index 4065ac2..21b5a82 100644 --- a/translations/generate.theme.yml +++ b/translations/generate.theme.yml @@ -2,42 +2,68 @@ description: 'Generate a theme.' help: 'The generate:theme command helps you generates a new theme.' welcome: 'Welcome to the Drupal theme generator' options: - theme: 'The theme name' - machine-name: 'The machine name (lowercase and underscore only)' - theme-path: 'The path of the theme' - description: 'Theme description' - core: 'Core version' - package: 'Theme package' - composer: 'Add a composer.json file' - base-theme: 'Base theme (i.e. classy, stable)' - global-library: 'Global styling library name' - regions: Regions - breakpoints: Breakpoints + theme: 'The theme name' + machine-name: 'The machine name (lowercase and underscore only)' + theme-path: 'The path of the theme' + description: 'Theme description' + core: 'Core version' + package: 'Theme package' + composer: 'Add a composer.json file' + base-theme: 'Base theme (i.e. classy, stable)' + global-library: 'Global styling library name' + regions: Regions + breakpoints: Breakpoints questions: - theme: 'Enter the new theme name' - machine-name: 'Enter the theme machine name' - theme-path: 'Enter the theme Path' - description: 'Enter theme description' - core: 'Enter Drupal Core version' - package: 'Enter package name' - dependencies: 'Would you like to add module dependencies' - invalid-theme: 'Invalid "%s" theme was selected' - global-library: 'Enter the global styling library name' - library-add: 'Do you want to add another library' - library-name: 'Enter library name' - library-version: 'Enter library version' - regions: 'Do you want to generate the theme regions' - region-name: 'Enter region name' - region-machine-name: 'Enter region machine name' - region-add: 'Do you want to add another region' - breakpoints: 'Do you want to generate the theme breakpoints' - breakpoint-name: 'Enter breakpoint name' - breakpoint-label: 'Enter breakpoint label' - breakpoint-media-query: 'Enter breakpoint media query' - breakpoint-weight: 'Enter breakpoint weight' - breakpoint-multipliers: 'Enter breakpoint multipliers' - breakpoint-add: 'Do you want to add another breakpoint' + theme: 'Enter the new theme name' + machine-name: 'Enter the theme machine name' + theme-path: 'Enter the theme Path' + description: 'Enter theme description' + core: 'Enter Drupal Core version' + package: 'Enter package name' + dependencies: 'Would you like to add module dependencies' + invalid-theme: 'Invalid "%s" theme was selected' + global-library: 'Enter the global styling library name' + library-add: 'Do you want to add another library' + library-name: 'Enter library name' + library-version: 'Enter library version' + regions: 'Do you want to generate the theme regions' + region-name: 'Enter region name' + region-machine-name: 'Enter region machine name' + region-add: 'Do you want to add another region' + breakpoints: 'Do you want to generate the theme breakpoints' + breakpoint-name: 'Enter breakpoint name' + breakpoint-label: 'Enter breakpoint label' + breakpoint-media-query: 'Enter breakpoint media query' + breakpoint-weight: 'Enter breakpoint weight' + breakpoint-multipliers: 'Enter breakpoint multipliers' + breakpoint-add: 'Do you want to add another breakpoint' warnings: - module-unavailable: 'Warning The following modules are not already available in your local environment "%s"' + module-unavailable: 'Warning The following modules are not already available in your local environment "%s"' errors: - directory-exists: 'The target directory "%s" is not empty.' + directory-exists: 'The target directory "%s" is not empty.' +examples: + - description: 'Generate a theme without region and without breakpoint specifying the theme name, its machine name, the theme path, a description, the drupal core, the package name and the global library' + execution: | + drupal generate:theme \ + --theme="AnotherTheme" \ + --machine-name="anothertheme" \ + --theme-path="/themes/custom" \ + --description="My Awesome theme" \ + --core="8.x" \ + --package="PackageName" \ + --global-library="global-styling" \ + --base-theme="false" + - description: 'Generate a theme base on stable theme with two region defined and one breakpoint specifying the theme name, its machine name, the theme path, a description, the drupal core, the package name, a global library, its base, the regions and the breakpoint' + execution: | + drupal generate:theme \ + --theme="MyTheme" \ + --machine-name="mytheme" \ + --theme-path="/themes/custom" \ + --description="My Awesome theme" \ + --core="8.x" \ + --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"' diff --git a/translations/generate.twig.extension.yml b/translations/generate.twig.extension.yml index dcf2a83..8f6ecd4 100644 --- a/translations/generate.twig.extension.yml +++ b/translations/generate.twig.extension.yml @@ -2,6 +2,13 @@ description: 'Generate a Twig extension.' help: 'The generate:twig:extension command helps you to generate a Twig extension.' welcome: 'Welcome to the Drupal Twig Extension generator' options: - name: 'Twig Extension name' + name: 'Twig Extension name' questions: - twig-extension: 'Enter the Twig extension name' + twig-extension: 'Enter the Twig extension name' +examples: + - description: 'Generate a twig extension specifying the module name, the extension name and its class' + execution: | + drupal generate:twig:extension \ + --module="modulename" \ + --name="modulename.twig.extension" \ + --class="DefaultTwigExtension" diff --git a/translations/generate.update.yml b/translations/generate.update.yml index ca77f19..176087e 100644 --- a/translations/generate.update.yml +++ b/translations/generate.update.yml @@ -1,8 +1,14 @@ description: 'Generate an implementation of hook_update_N()' help: 'The "%s" command helps you generate a hook update N "%s"' options: - update-n: 'Update Number' + update-n: 'Update Number' questions: - update-n: 'Please provide the Update N to be implemeted' + update-n: 'Please provide the Update N to be implemeted' messages: - wrong-update-n: 'The update number "%s" is invalid' + wrong-update-n: 'The update number "%s" is invalid' +examples: + - description: 'Generate an update N hook implementation specifying the module name and the N value' + execution: | + drupal generate:update \ + --module="modulename" \ + --update-n="8001" From 70b58276e8d50139b2633d7560dcbb0678f49ed6 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Tue, 11 Jul 2017 12:16:20 -0500 Subject: [PATCH 05/14] Adding module commands examples --- translations/module.download.yml | 33 +++++++++++--------- translations/module.install.yml | 50 +++++++++++++++++-------------- translations/module.path.yml | 9 ++++-- translations/module.uninstall.yml | 26 +++++++++------- 4 files changed, 67 insertions(+), 51 deletions(-) diff --git a/translations/module.download.yml b/translations/module.download.yml index 690579f..017a91b 100644 --- a/translations/module.download.yml +++ b/translations/module.download.yml @@ -1,19 +1,24 @@ description: 'Download module or modules in application' arguments: - module: 'Module or modules to be enabled should be separated by a space' + module: 'Module or modules to be enabled should be separated by a space' options: - latest: 'Default to download most recent version' - path: 'The path of the contrib project' - composer: 'Option to point out that the module will be downloaded, managed & installed by Composer' + latest: 'Default to download most recent version' + path: 'The path of the contrib project' + composer: 'Option to point out that the module will be downloaded, managed & installed by Composer' questions: - path: 'Enter the contrib project Path' + path: 'Enter the contrib project Path' messages: - no-releases: 'There aren''t any releases for module "%s"' - getting-releases: 'Getting releases for module "%s"' - downloading: 'Downloading module "%s" release "%s"' - downloaded: 'Module "%s" version "%s" was downloaded successfully at "%s"' - select-release: 'Please select your favorite release' - outside-drupal: "Drupal root can't be determined. Use --root to set the destination, current folder will be used instead of." - error-creating-folder: 'Error creating folder "%s", please check your permissions' - no-composer-repo: 'Please, configure Composer in ~/.console/config.yml' - composer: 'Module "%s" was downloaded successfully using Composer' + no-releases: 'There aren''t any releases for module "%s"' + getting-releases: 'Getting releases for module "%s"' + downloading: 'Downloading module "%s" release "%s"' + downloaded: 'Module "%s" version "%s" was downloaded successfully at "%s"' + select-release: 'Please select your favorite release' + outside-drupal: "Drupal root can't be determined. Use --root to set the destination, current folder will be used instead of." + error-creating-folder: 'Error creating folder "%s", please check your permissions' + no-composer-repo: 'Please, configure Composer in ~/.console/config.yml' + composer: 'Module "%s" was downloaded successfully using Composer' +examples: + - description: 'Download module specifying module name and its path' + execution: | + drupal module:download modulename \ + --path="modules/contrib" diff --git a/translations/module.install.yml b/translations/module.install.yml index 887d72e..c2aad0d 100644 --- a/translations/module.install.yml +++ b/translations/module.install.yml @@ -1,28 +1,32 @@ description: 'Install module or modules in the application' arguments: - module: 'Module or modules to be enabled should be separated by a space' + module: 'Module or modules to be enabled should be separated by a space' options: - latest: 'Default to download most recent version' - composer: 'Download the module using Composer' + latest: 'Default to download most recent version' + composer: 'Download the module using Composer' questions: - module: 'Module name (press to stop adding modules)' - invalid-module: 'Invalid module "%s"' + module: 'Module name (press to stop adding modules)' + invalid-module: 'Invalid module "%s"' messages: - no-modules: 'You must provide module or modules to enable.' - missing: 'Unable to install module(s) "%s" due to missing module(s) "%s"' - missing-dependencies: 'Unable to install modules "%s" due to missing dependencies "%s"' - nothing: 'Nothing to do. All modules are already installed' - dependencies: 'Are you sure you want to install dependencies: "%s"?' - success: 'The following module(s) were installed successfully: "%s"' - disabled-modules: 'Only disabled modules will be listed in autocomplete' - config-conflict-overwrite: 'These configuration objects will be overwritten in your active configuration' - config-conflict: 'These configuration objects already exist in active configuration, installation is not possible' - getting-missing-modules: 'One or more modules "%s" are not available, running download process to get those modules' - getting-releases: 'Getting releases for module "%s"' - select-release: 'Please select your favorite release' - downloading: 'Downloading module "%s" release "%s"' - downloaded: 'Module "%s" version "%s" was downloaded successfully at "%s"' - no-releases: 'There aren''t any releases for module "%s"' - installing: 'Installing module(s) "%s"' - composer: 'The module was installed successfully with Composer' - error-creating-folder: 'Error creating folder "%s", please check your permissions' + no-modules: 'You must provide module or modules to enable.' + missing: 'Unable to install module(s) "%s" due to missing module(s) "%s"' + missing-dependencies: 'Unable to install modules "%s" due to missing dependencies "%s"' + nothing: 'Nothing to do. All modules are already installed' + dependencies: 'Are you sure you want to install dependencies: "%s"?' + success: 'The following module(s) were installed successfully: "%s"' + disabled-modules: 'Only disabled modules will be listed in autocomplete' + config-conflict-overwrite: 'These configuration objects will be overwritten in your active configuration' + config-conflict: 'These configuration objects already exist in active configuration, installation is not possible' + getting-missing-modules: 'One or more modules "%s" are not available, running download process to get those modules' + getting-releases: 'Getting releases for module "%s"' + select-release: 'Please select your favorite release' + downloading: 'Downloading module "%s" release "%s"' + downloaded: 'Module "%s" version "%s" was downloaded successfully at "%s"' + no-releases: 'There aren''t any releases for module "%s"' + installing: 'Installing module(s) "%s"' + composer: 'The module was installed successfully with Composer' + error-creating-folder: 'Error creating folder "%s", please check your permissions' +examples: + - description: 'Install module specifying the module name' + execution: | + drupal module:install modulename diff --git a/translations/module.path.yml b/translations/module.path.yml index 7e48506..70407ff 100644 --- a/translations/module.path.yml +++ b/translations/module.path.yml @@ -1,7 +1,10 @@ description: 'Returns the relative path to the module (or absolute path)' arguments: - module: 'The Module name (machine name)' + module: 'The Module name (machine name)' options: - absolute: 'Return module absolute path' + absolute: 'Return module absolute path' messages: - +examples: + - description: 'Get the relative path of the module specifying the module name' + execution: | + drupal module:path modulename diff --git a/translations/module.uninstall.yml b/translations/module.uninstall.yml index 22e2c1e..3b6d6a8 100755 --- a/translations/module.uninstall.yml +++ b/translations/module.uninstall.yml @@ -1,15 +1,19 @@ description: 'Uninstall module or modules in the application' questions: - module: 'Module name (press to stop adding modules)' - invalid-module: 'Invalid module "%s"' + module: 'Module name (press to stop adding modules)' + invalid-module: 'Invalid module "%s"' options: - module: 'Module or modules to be uninstalled should be separated by a space' - force: 'Do you want to ignore dependencies and forcefully uninstall the module?' - composer: 'Uninstalls the module using Composer' + module: 'Module or modules to be uninstalled should be separated by a space' + force: 'Do you want to ignore dependencies and forcefully uninstall the module?' + composer: 'Uninstalls the module using Composer' messages: - no-modules: 'You must provide module or modules to uninstall.' - dependents: 'Unable to uninstall modules "%s" because are required by "%s"' - nothing: 'Nothing to do. All modules are already uninstalled' - success: 'The following module(s) were uninstalled successfully: "%s"' - missing: 'Unable to uninstall modules "%s" due to missing modules "%s"' - composer-success: 'You should execute now the following command: "composer remove vendor/package"' + no-modules: 'You must provide module or modules to uninstall.' + dependents: 'Unable to uninstall modules "%s" because are required by "%s"' + nothing: 'Nothing to do. All modules are already uninstalled' + success: 'The following module(s) were uninstalled successfully: "%s"' + missing: 'Unable to uninstall modules "%s" due to missing modules "%s"' + composer-success: 'You should execute now the following command: "composer remove vendor/package"' +examples: + - description: 'Uninstall the module specifying the module name' + execution: | + drupal module:uninstall modulename From d8009bc83a8fe67f841531a4a99e8b0b3f396f17 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Tue, 11 Jul 2017 12:42:58 -0500 Subject: [PATCH 06/14] Adding example for image, multisite, node, router and settings command --- translations/image.styles.flush.yml | 7 +++++ translations/multisite.new.yml | 38 +++++++++++++++------------- translations/node.access.rebuild.yml | 13 +++++----- translations/router.rebuild.yml | 10 +++++--- translations/settings.set.yml | 4 +++ 5 files changed, 46 insertions(+), 26 deletions(-) diff --git a/translations/image.styles.flush.yml b/translations/image.styles.flush.yml index cf740fe..f613fad 100644 --- a/translations/image.styles.flush.yml +++ b/translations/image.styles.flush.yml @@ -6,3 +6,10 @@ options: image-style: 'The Images Styles name.' questions: image-style: 'Select Images Styles to flush.' +examples: + - description: 'Flush large image style' + execution: | + drupal image:styles:flush large + - description: 'Flush thumbnail image style' + execution: | + drupal image:styles:flush thumbnail diff --git a/translations/multisite.new.yml b/translations/multisite.new.yml index b1b72f8..012c23f 100644 --- a/translations/multisite.new.yml +++ b/translations/multisite.new.yml @@ -1,24 +1,28 @@ description: "Sets up the files for a new multisite install." help: "The multisite:new command assists in setting up new multisite installs by creating the needed subdirectory and files, and can optionally copy an existing 'default' installation." arguments: - directory: "Name of directory under 'sites' which should be created." - uri: "Site URI to add to sites.php." + directory: "Name of directory under 'sites' which should be created." + uri: "Site URI to add to sites.php." options: - copy-default: "Copies existing site from the default install." + copy-default: "Copies existing site from the default install." errors: - subdir-empty: "You must specify a multisite subdirectory to create." - subdir-exists: 'The "sites/%s" directory already exists.' - default-missing: "The sites/default directory is missing." - mkdir-fail: 'Unable to create "sites/%s". Please check the sites directory permissions and try again.' - sites-invalid: "The sites.php file located is either not readable or not a file." - sites-missing: "No sites.php or example.sites.php to copy from." - sites-other: "A problem was encountered when attempting to write sites.php" - file-missing: 'The file "%s" was not found for copying.' - copy-fail: 'Unable to copy "%s" to "%s". Please check permissions and try again.' - write-fail: 'Unable to write to the file "%s". Please check the file permissions and try again.' - chmod-fail: 'Unable to change permissions on the file "%s". Please ensure that the permissions on that file are correct.' + subdir-empty: "You must specify a multisite subdirectory to create." + subdir-exists: 'The "sites/%s" directory already exists.' + default-missing: "The sites/default directory is missing." + mkdir-fail: 'Unable to create "sites/%s". Please check the sites directory permissions and try again.' + sites-invalid: "The sites.php file located is either not readable or not a file." + sites-missing: "No sites.php or example.sites.php to copy from." + sites-other: "A problem was encountered when attempting to write sites.php" + file-missing: 'The file "%s" was not found for copying.' + copy-fail: 'Unable to copy "%s" to "%s". Please check permissions and try again.' + write-fail: 'Unable to write to the file "%s". Please check the file permissions and try again.' + chmod-fail: 'Unable to change permissions on the file "%s". Please ensure that the permissions on that file are correct.' warnings: - missing-files: "No sites/default/files directory found. The files directory will need to be created by hand." + missing-files: "No sites/default/files directory found. The files directory will need to be created by hand." messages: - copy-default: 'The default install was successfully copied to "sites/%s".' - fresh-site: 'The new multisite structure was successfully created at "sites/%s" and is ready for installation.' + copy-default: 'The default install was successfully copied to "sites/%s".' + fresh-site: 'The new multisite structure was successfully created at "sites/%s" and is ready for installation.' +examples: + - description: 'Set up files for a multisite install specifying destination path and uri' + execution: | + drupal multisite:new vendor/newsite http://mysite.example.com diff --git a/translations/node.access.rebuild.yml b/translations/node.access.rebuild.yml index 98c57b2..c18b6da 100644 --- a/translations/node.access.rebuild.yml +++ b/translations/node.access.rebuild.yml @@ -1,11 +1,12 @@ description: 'Rebuild node access permissions.' help: 'Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings.' options: - batch: 'Process in batch mode.' + batch: 'Process in batch mode.' messages: - rebuild: 'Rebuilding node access permissions, one moment please.' - completed: 'Done rebuilding permissions.' - failed: 'Rebuilding permissions was not successful.' + rebuild: 'Rebuilding node access permissions, one moment please.' + completed: 'Done rebuilding permissions.' + failed: 'Rebuilding permissions was not successful.' examples: - - description: Rebuild node access permissions - execution: drupal node:access:rebuild --batch + - description: Rebuild node access permissions + execution: + drupal node:access:rebuild --batch diff --git a/translations/router.rebuild.yml b/translations/router.rebuild.yml index 54e1e60..bc0fbc1 100644 --- a/translations/router.rebuild.yml +++ b/translations/router.rebuild.yml @@ -1,6 +1,10 @@ description: 'Rebuild routes for the application' arguments: - route-name: 'Route names' + route-name: 'Route names' messages: - rebuilding: 'Rebuilding routes, wait a moment please' - completed: 'Done rebuilding route(s).' + rebuilding: 'Rebuilding routes, wait a moment please' + completed: 'Done rebuilding route(s).' +examples: + - description: 'Rebuild routes' + execution: + drupal router:rebuild diff --git a/translations/settings.set.yml b/translations/settings.set.yml index adf68b3..b7150bc 100644 --- a/translations/settings.set.yml +++ b/translations/settings.set.yml @@ -9,3 +9,7 @@ messages: success: 'Setting "%s" was set to "%s"' missing-file: 'The "%s" config file is missing, try executing `drupal init`' missing-language: 'Provided language: "%s", not found' +examples: + - description: 'Set application language setting value to "es"' + execution: + drupal settings:set application.language es From 218d10e33bcb4d176a1c52a622615105bb46b1de Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Tue, 11 Jul 2017 13:14:42 -0500 Subject: [PATCH 07/14] Adding site commands example --- translations/site.import.local.yml | 25 +++++++----- translations/site.install.yml | 64 +++++++++++++++++++----------- translations/site.maintenance.yml | 15 +++++-- translations/site.mode.yml | 35 +++++++++------- translations/site.status.yml | 47 ++++++++++++---------- 5 files changed, 112 insertions(+), 74 deletions(-) diff --git a/translations/site.import.local.yml b/translations/site.import.local.yml index f4e97c0..196a0ec 100644 --- a/translations/site.import.local.yml +++ b/translations/site.import.local.yml @@ -1,17 +1,20 @@ description: 'Import/Configure an existing local Drupal project' help: 'The site:import:local does create the yaml configuration file for a local existing site.' arguments: - directory: 'Existing Drupal root directory' - name: 'Name that will be used to generate the site config' + directory: 'Existing Drupal root directory' + name: 'Name that will be used to generate the site config' options: - environment: 'Name of the environment that is going to be imported' + environment: 'Name of the environment that is going to be imported' messages: - imported: 'The site has been imported successfully. You might want to run `drupal site:debug` to confirm that everything went well.' - error-missing: 'The directory "%s" doesn''t exist.' - error-not-drupal: 'This is not a valid drupal root: "%s"' - error-writing: 'An error accurred while trying to write the config file: "%s"' + imported: 'The site has been imported successfully. You might want to run `drupal site:debug` to confirm that everything went well.' + error-missing: 'The directory "%s" doesn''t exist.' + error-not-drupal: 'This is not a valid drupal root: "%s"' + error-writing: 'An error accurred while trying to write the config file: "%s"' questions: - directory: 'Enter the directory name where to install Drupal' - name: 'Enter the name of the site' - environment: 'Enter the site environment name' - + directory: 'Enter the directory name where to install Drupal' + name: 'Enter the name of the site' + environment: 'Enter the site environment name' +examples: + - description: 'Import local drupal project specifying the site name and the path' + execution: + drupal site:import:local SiteName /private/var/www/vhost/anexusit/drupal8.dev/web diff --git a/translations/site.install.yml b/translations/site.install.yml index 79c4257..c1c2fa1 100644 --- a/translations/site.install.yml +++ b/translations/site.install.yml @@ -1,29 +1,45 @@ description: 'Install a Drupal project' arguments: - profile: 'Drupal Profile to be installed' - langcode: 'Drupal language' - db-type: 'Drupal Database type to be used in install' - db-file: 'Drupal Database file to be used in install' - site-name: 'Drupal site name' - site-mail: 'Drupal site mail' - account-name: 'Drupal administrator account name' - account-mail: 'Drupal administrator account mail' - account-pass: 'Drupal administrator account password' + profile: 'Drupal Profile to be installed' + langcode: 'Drupal language' + db-type: 'Drupal Database type to be used in install' + db-file: 'Drupal Database file to be used in install' + site-name: 'Drupal site name' + site-mail: 'Drupal site mail' + account-name: 'Drupal administrator account name' + account-mail: 'Drupal administrator account mail' + account-pass: 'Drupal administrator account password' questions: - profile: 'Select Drupal profile to be installed' - langcode: 'Select language for your Drupal installation' - db-type: 'Select Drupal Database type to be used in install' - site-name: 'Provide your Drupal site name' - site-mail: 'Provide your Drupal site mail' - account-name: 'Provide your Drupal administrator account name' - account-mail: 'Provide your Drupal administrator account mail' - account-pass: 'Provide your Drupal administrator account password' + profile: 'Select Drupal profile to be installed' + langcode: 'Select language for your Drupal installation' + db-type: 'Select Drupal Database type to be used in install' + site-name: 'Provide your Drupal site name' + site-mail: 'Provide your Drupal site mail' + account-name: 'Provide your Drupal administrator account name' + account-mail: 'Provide your Drupal administrator account mail' + account-pass: 'Provide your Drupal administrator account password' messages: - installing: 'Starting Drupal 8 install process' - installed: 'Your Drupal 8 installation was completed successfully' - using-current-database: 'Using "%s" database with name "%s" and user "%s"' - already-installed: 'Drupal is already installed, try dropping your database executing database:drop or install executing site:install --force --no-interaction' - sites-backup: 'The sites.php file has temporarily been renamed to backup.sites.php while Drupal installs.' - sites-restore: 'The backup of sites.php has been been restored to sites.php.' - invalid-multisite: 'Invalid multisite, please create multisite using command drupal multisite:new %s "%s"' + installing: 'Starting Drupal 8 install process' + installed: 'Your Drupal 8 installation was completed successfully' + using-current-database: 'Using "%s" database with name "%s" and user "%s"' + already-installed: 'Drupal is already installed, try dropping your database executing database:drop or install executing site:install --force --no-interaction' + sites-backup: 'The sites.php file has temporarily been renamed to backup.sites.php while Drupal installs.' + sites-restore: 'The backup of sites.php has been been restored to sites.php.' + invalid-multisite: 'Invalid multisite, please create multisite using command drupal multisite:new %s "%s"' +examples: + - description: 'Install a drupal project specifying installation type, language code, database configuration, site name, site email and admin credential settings' + execution: | + drupal site:install standard \ + --langcode="en" \ + --db-type="mysql" \ + --db-host="127.0.0.1" \ + --db-name="drupal8" \ + --db-user="u53rn4m3" \ + --db-pass="dbp455" \ + --db-port="3306" \ + --site-name="Drupal 8" \ + --site-mail="admin@example.com" \ + --account-name="admin" \ + --account-mail="admin@example.com" \ + --account-pass="p455w0rd" diff --git a/translations/site.maintenance.yml b/translations/site.maintenance.yml index e4c9a10..a2fcf31 100644 --- a/translations/site.maintenance.yml +++ b/translations/site.maintenance.yml @@ -1,8 +1,15 @@ description: 'Switch site into maintenance mode' arguments: - mode: 'Site maintenance mode' + mode: 'Site maintenance mode' messages: - maintenance-on: 'Operating in maintenance mode on' - maintenance-off: 'Operating in maintenance mode off' + maintenance-on: 'Operating in maintenance mode on' + maintenance-off: 'Operating in maintenance mode off' errors: - invalid-mode: 'Invalid maintenance mode' + invalid-mode: 'Invalid maintenance mode' +examples: + - description: 'Switch on maintenance' + execution: | + drupal site:maintenance on + - description: 'Switch off maintenance' + execution: | + drupal site:maintenance off diff --git a/translations/site.mode.yml b/translations/site.mode.yml index b7296d6..92deb64 100644 --- a/translations/site.mode.yml +++ b/translations/site.mode.yml @@ -1,18 +1,25 @@ description: 'Switch system performance configuration' arguments: - environment: 'Environment name [dev, prod]' + environment: 'Environment name [dev, prod]' options: - local: 'Use this option for testing PROD config, but using settings.local.php for connect to your local environment' + local: 'Use this option for testing PROD config, but using settings.local.php for connect to your local environment' messages: - configuration: 'Configuration name' - configuration-key: 'Configuration key' - original: 'Original Value' - updated: 'Override Value' - invalid-env: 'Invalid environment' - new-services-settings: 'New services settings' - service: 'Service' - service-parameter: 'Parameter' - service-value: 'Value' - error-copying-file: 'Error copying file' - error-writing-file: 'Error copying file' - services-file-overwritten: 'Services files "%s" was overwritten' + configuration: 'Configuration name' + configuration-key: 'Configuration key' + original: 'Original Value' + updated: 'Override Value' + invalid-env: 'Invalid environment' + new-services-settings: 'New services settings' + service: 'Service' + service-parameter: 'Parameter' + service-value: 'Value' + error-copying-file: 'Error copying file' + error-writing-file: 'Error copying file' + services-file-overwritten: 'Services files "%s" was overwritten' +examples: + - description: 'Switch system to prod' + execution: | + drupal site:mode prod + - description: 'Switch system to dev' + execution: | + drupal site:mode dev diff --git a/translations/site.status.yml b/translations/site.status.yml index f6474dd..22c15f9 100644 --- a/translations/site.status.yml +++ b/translations/site.status.yml @@ -1,23 +1,28 @@ description: 'View current Drupal Installation status' messages: - application: Application - system: 'System Info' - hash_salt: 'Hash salt' - console: 'Drupal Console' - database: 'Database connection' - driver: 'Driver' - host: 'Host' - port: 'Port' - username: 'Username' - password: 'Password' - theme: 'Themes' - connection: 'Connection' - theme_default: 'Default theme' - theme_admin: 'Admin theme' - directory: 'Directories' - directory_root: 'Site root directory' - directory_temporary: 'Site temporary directory' - directory_theme_default: 'Default theme directory' - directory_theme_admin: 'Admin theme directory' - current_version: 'Current Drupal ("%s")' - not_installed: 'Drupal is not installed' + application: Application + system: 'System Info' + hash_salt: 'Hash salt' + console: 'Drupal Console' + database: 'Database connection' + driver: 'Driver' + host: 'Host' + port: 'Port' + username: 'Username' + password: 'Password' + theme: 'Themes' + connection: 'Connection' + theme_default: 'Default theme' + theme_admin: 'Admin theme' + directory: 'Directories' + directory_root: 'Site root directory' + directory_temporary: 'Site temporary directory' + directory_theme_default: 'Default theme directory' + directory_theme_admin: 'Admin theme directory' + current_version: 'Current Drupal ("%s")' + not_installed: 'Drupal is not installed' +examples: + - description: 'Get drupal installation status specifying the output format as table' + execution: | + drupal site:status \ + --format="table" From d9ea402087617b960857d6b92f7e5bbc66b7d97f Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Wed, 12 Jul 2017 15:09:30 -0500 Subject: [PATCH 08/14] Adding example command for state, taxonomy, update and views --- translations/state.delete.yml | 12 ++++++++---- translations/state.override.yml | 8 ++++++-- translations/taxonomy.term.delete.yml | 4 ++++ translations/update.entities.yml | 4 ++++ translations/update.execute.yml | 14 +++++++++----- translations/views.disable.yml | 9 ++++++++- translations/views.enable.yml | 7 +++++++ 7 files changed, 46 insertions(+), 12 deletions(-) diff --git a/translations/state.delete.yml b/translations/state.delete.yml index d9b531c..eab626f 100644 --- a/translations/state.delete.yml +++ b/translations/state.delete.yml @@ -1,7 +1,11 @@ description: 'Delete State' arguments: - name: 'State name.' + name: 'State name.' messages: - enter-name: 'State name must contain a value.' - state-not-exists: 'The state "%s" does not exist.' - deleted: 'State "%s" sucessfully deleted.' \ No newline at end of file + enter-name: 'State name must contain a value.' + state-not-exists: 'The state "%s" does not exist.' + deleted: 'State "%s" sucessfully deleted.' +examples: + - description: 'Delete state specifying the state name' + execution: | + drupal state:delete comment.maintain_entity_statistics diff --git a/translations/state.override.yml b/translations/state.override.yml index 1faadb4..8511d1a 100644 --- a/translations/state.override.yml +++ b/translations/state.override.yml @@ -8,5 +8,9 @@ messages: original: 'Original value' override: 'Override value' errors: - no-key: 'You must provide a State key to override.' - no-value: 'You must provide a State value to set.' + no-key: 'You must provide a State key to override.' + no-value: 'You must provide a State value to set.' +examples: + - description: 'Override state value specifying the state name and the new value' + execution: | + drupal state:override comment.node_comment_statistics_scale "!!float 1" diff --git a/translations/taxonomy.term.delete.yml b/translations/taxonomy.term.delete.yml index d06faf3..e9b29b3 100644 --- a/translations/taxonomy.term.delete.yml +++ b/translations/taxonomy.term.delete.yml @@ -1,2 +1,6 @@ description: 'Delete taxonomy terms from a vocabulary' help: 'This command takes the VID as argument or all which will delete every term from every vocabulary' +examples: + - description: 'Delete all terms of the "tags" vocabulary' + execution: | + drupal taxonomy:term:delete tags diff --git a/translations/update.entities.yml b/translations/update.entities.yml index 67d58ee..9be4b36 100644 --- a/translations/update.entities.yml +++ b/translations/update.entities.yml @@ -3,3 +3,7 @@ messages: start: 'Starting the entity updates' end: 'Finished the entity updates' error: 'Error on Entity Updates' +examples: + - description: 'Update entities' + execution: | + drupal update:entities diff --git a/translations/update.execute.yml b/translations/update.execute.yml index 5e2a708..b19c0ce 100644 --- a/translations/update.execute.yml +++ b/translations/update.execute.yml @@ -1,8 +1,12 @@ description: 'Execute a specific Update N function in a module, or execute all' options: - update-n: 'Specific Update N function to be executed' + update-n: 'Specific Update N function to be executed' messages: - no-module-updates: 'There aren''t updates available for module "%s"' - executing-update: 'Executing update function "%s" of module "%s"' - module-update-function-not-found: 'Module "%s" doesn''t have a function update for "%s"' - executing-required-previous-updates: 'Executing required previous updates' + no-module-updates: 'There aren''t updates available for module "%s"' + executing-update: 'Executing update function "%s" of module "%s"' + module-update-function-not-found: 'Module "%s" doesn''t have a function update for "%s"' + executing-required-previous-updates: 'Executing required previous updates' +examples: + - description: 'Update all entities' + execution: | + drupal update:execute diff --git a/translations/views.disable.yml b/translations/views.disable.yml index d309fbf..e8dd354 100644 --- a/translations/views.disable.yml +++ b/translations/views.disable.yml @@ -1,3 +1,10 @@ description: 'Disable a View' messages: - disabled-successfully: 'View "%s" was disabled successfully.' + disabled-successfully: 'View "%s" was disabled successfully.' +examples: + - description: 'Disable content view' + execution: | + drupal views:disable content + - description: 'Disable frontpage view' + execution: | + drupal views:disable frontpage diff --git a/translations/views.enable.yml b/translations/views.enable.yml index 952b6ab..4531768 100644 --- a/translations/views.enable.yml +++ b/translations/views.enable.yml @@ -1,3 +1,10 @@ description: 'Enable a View' messages: enabled-successfully: 'View "%s" was enabled successfully.' +examples: + - description: 'Enable content view' + execution: | + drupal views:enable content + - description: 'Enable frontpage view' + execution: | + drupal views:enable frontpage From 2076b9feb75a07719d567835d2b2803f1c1ede1a Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Wed, 12 Jul 2017 15:10:02 -0500 Subject: [PATCH 09/14] Adding examples for theme command --- translations/theme.download.yml | 24 +++++++++++--------- translations/theme.install.yml | 38 ++++++++++++++++++-------------- translations/theme.path.yml | 9 +++++--- translations/theme.uninstall.yml | 36 ++++++++++++++++-------------- 4 files changed, 61 insertions(+), 46 deletions(-) diff --git a/translations/theme.download.yml b/translations/theme.download.yml index b91ebbd..6fff4d5 100644 --- a/translations/theme.download.yml +++ b/translations/theme.download.yml @@ -1,14 +1,18 @@ description: 'Download theme in application' arguments: - version: 'Theme version i.e 1.x-dev' - theme: 'the Theme name' + version: 'Theme version i.e 1.x-dev' + theme: 'the Theme name' options: - composer: 'Use --composer option for manage the theme download with Composer' + composer: 'Use --composer option for manage the theme download with Composer' messages: - no-releases: 'There aren''t any releases for theme "%s"' - getting-releases: 'Getting releases for theme "%s"' - downloading: 'Downloading theme "%s" release "%s"' - downloaded: 'Theme "%s" version "%s" was downloaded successfully at "%s"' - select-release: 'Please select your favorite release' - outside-drupal: 'Drupal root can''t be determined. Use --root to set the destination, current folder will be used instead of.' - error-creating-folder: 'Error creating folder "%s", please check your permissions' + no-releases: 'There aren''t any releases for theme "%s"' + getting-releases: 'Getting releases for theme "%s"' + downloading: 'Downloading theme "%s" release "%s"' + downloaded: 'Theme "%s" version "%s" was downloaded successfully at "%s"' + select-release: 'Please select your favorite release' + outside-drupal: 'Drupal root can''t be determined. Use --root to set the destination, current folder will be used instead of.' + error-creating-folder: 'Error creating folder "%s", please check your permissions' +examples: + - description: 'Download theme specifying name and version' + execution: | + drupal theme:download Alina 7.x-1.2 diff --git a/translations/theme.install.yml b/translations/theme.install.yml index 795ae15..5b880dc 100644 --- a/translations/theme.install.yml +++ b/translations/theme.install.yml @@ -1,21 +1,25 @@ description: 'Install theme or themes in the application' questions: - theme: 'theme name (press to stop adding themes)' - invalid-theme: 'Invalid theme "%s"' + theme: 'theme name (press to stop adding themes)' + invalid-theme: 'Invalid theme "%s"' options: - theme: 'theme or themes to be installed should be separated by a comma' - overwrite-config: 'Overwrite active configuration if necessary' - set-default: 'Set theme as default theme' + theme: 'theme or themes to be installed should be separated by a comma' + overwrite-config: 'Overwrite active configuration if necessary' + set-default: 'Set theme as default theme' messages: - no-themes: 'You must provide theme or themes to install.' - themes-missing: 'Unable to install themes "%s" due they aren''t available' - theme-missing: 'Unable to install theme "%s" due is not available' - missing-dependencies: 'Unable to install themes "%s" due to missing dependencies "%s"' - themes-nothing: 'Nothing to do. All themes "%s" are already installed' - theme-nothing: 'Nothing to do. Theme "%s" is already installed' - dependencies: 'There are some unmet dependencies: "%s"?' - theme-success: 'The "%s" theme has been installed successfully' - themes-success: 'The themes "%s" were installed successfully' - theme-default-success: 'The "%s" theme has been installed successfully as default theme' - disabled-themes: 'Only uninstalled themes will be listed in autocomplete' - invalid-theme-default: 'Option default is only valid for one theme' + no-themes: 'You must provide theme or themes to install.' + themes-missing: 'Unable to install themes "%s" due they aren''t available' + theme-missing: 'Unable to install theme "%s" due is not available' + missing-dependencies: 'Unable to install themes "%s" due to missing dependencies "%s"' + themes-nothing: 'Nothing to do. All themes "%s" are already installed' + theme-nothing: 'Nothing to do. Theme "%s" is already installed' + dependencies: 'There are some unmet dependencies: "%s"?' + theme-success: 'The "%s" theme has been installed successfully' + themes-success: 'The themes "%s" were installed successfully' + theme-default-success: 'The "%s" theme has been installed successfully as default theme' + disabled-themes: 'Only uninstalled themes will be listed in autocomplete' + invalid-theme-default: 'Option default is only valid for one theme' +examples: + - description: 'Install theme specifying the name' + execution: | + drupal theme:install mytheme diff --git a/translations/theme.path.yml b/translations/theme.path.yml index 095e29a..e4512f7 100644 --- a/translations/theme.path.yml +++ b/translations/theme.path.yml @@ -1,7 +1,10 @@ description: 'Returns the relative path to the theme (or absolute path)' arguments: - module: 'The Theme name (machine name)' + module: 'The Theme name (machine name)' options: - absolute: 'Return theme absolute path' + absolute: 'Return theme absolute path' messages: - +examples: + - description: 'Get the path of mytheme' + execution: | + drupal theme:path mytheme diff --git a/translations/theme.uninstall.yml b/translations/theme.uninstall.yml index db53af4..283609d 100644 --- a/translations/theme.uninstall.yml +++ b/translations/theme.uninstall.yml @@ -1,20 +1,24 @@ description: 'Uninstall theme or themes in the application' questions: - theme: 'theme name (press to stop adding themes)' - invalid-theme: 'Invalid theme "%s"' + theme: 'theme name (press to stop adding themes)' + invalid-theme: 'Invalid theme "%s"' options: - theme: 'theme or themes to be uninstalled should be separated by a comma' + theme: 'theme or themes to be uninstalled should be separated by a comma' messages: - no-themes: 'You must provide theme or themes to uninstall.' - themes-missing: 'Unable to uninstall themes "%s", because they aren''t available' - theme-missing: 'Unable to uninstall theme "%s", because it is not available' - missing-dependencies: 'Unable to uninstall themes "%s" due to missing dependencies "%s"' - themes-nothing: 'Nothing to do. All themes are already uninstalled: "%s"' - theme-nothing: 'Nothing to do. Theme "%s" is already uninstalled' - dependencies: 'There are some unmet dependencies: "%s"?' - theme-success: 'The "%s" theme has been uninstalled successfully' - themes-success: 'The themes "%s" were uninstalled successfully' - installed-themes: 'Only installed themes will be listed in autocomplete' - invalid-theme-default: 'Option default is only valid for one theme' - error-default-theme: 'Theme "%s" is the default theme and cannot be uninstalled.' - error-admin-theme: 'Theme "%s" is the admin theme and cannot be uninstalled.' + no-themes: 'You must provide theme or themes to uninstall.' + themes-missing: 'Unable to uninstall themes "%s", because they aren''t available' + theme-missing: 'Unable to uninstall theme "%s", because it is not available' + missing-dependencies: 'Unable to uninstall themes "%s" due to missing dependencies "%s"' + themes-nothing: 'Nothing to do. All themes are already uninstalled: "%s"' + theme-nothing: 'Nothing to do. Theme "%s" is already uninstalled' + dependencies: 'There are some unmet dependencies: "%s"?' + theme-success: 'The "%s" theme has been uninstalled successfully' + themes-success: 'The themes "%s" were uninstalled successfully' + installed-themes: 'Only installed themes will be listed in autocomplete' + invalid-theme-default: 'Option default is only valid for one theme' + error-default-theme: 'Theme "%s" is the default theme and cannot be uninstalled.' + error-admin-theme: 'Theme "%s" is the admin theme and cannot be uninstalled.' +examples: + - description: 'Uninstall theme specifying the name' + execution: | + drupal theme:uninstall mytheme From 1e5a1633f9b6adfaa2d8994cadd6888d458f010c Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Wed, 12 Jul 2017 15:11:45 -0500 Subject: [PATCH 10/14] Adding examples for user commands --- translations/user.create.yml | 49 ++++++++++++++++++---------- translations/user.delete.yml | 30 +++++++++++------ translations/user.login.url.yml | 10 ++++-- translations/user.password.hash.yml | 16 +++++---- translations/user.password.reset.yml | 24 ++++++++------ translations/user.role.yml | 23 ++++++++----- 6 files changed, 97 insertions(+), 55 deletions(-) diff --git a/translations/user.create.yml b/translations/user.create.yml index 6caeae3..0adc15a 100644 --- a/translations/user.create.yml +++ b/translations/user.create.yml @@ -2,23 +2,36 @@ description: 'Create users for the application' help: 'The user:create command helps you create users.' welcome: 'Welcome to the Drupal user create' options: - username: 'User name to be created' - password: 'User password' - roles: 'User roles' - email: 'User email' - status: 'User status' + username: 'User name to be created' + password: 'User password' + roles: 'User roles' + email: 'User email' + status: 'User status' questions: - username: 'User name to be created' - password: 'User password (empty to auto-generate)' - roles: 'User roles (empty to skip)' - email: 'User e-mail (empty to skip)' - status: 'User status (empty to skip)' + username: 'User name to be created' + password: 'User password (empty to auto-generate)' + roles: 'User roles (empty to skip)' + email: 'User e-mail (empty to skip)' + status: 'User status (empty to skip)' messages: - user-id: 'User ID' - username: 'Username' - password: 'Password' - email: 'E-mail' - roles: 'Roles' - created: 'Created' - status: 'Status' - user-created: 'User "%s" was created successfully' + user-id: 'User ID' + username: 'Username' + password: 'Password' + email: 'E-mail' + roles: 'Roles' + created: 'Created' + status: 'Status' + user-created: 'User "%s" was created successfully' +examples: + - description: 'Create user specifying username, password, role, email and status' + execution: | + drupal user:create john p455w0rd \ + --roles='authenticated' \ + --email="john@anexusit.com" \ + --status="1" + - description: 'Create admin user specifying username, password, role, email and status' + execution: | + drupal user:create doe p455w0rd \ + --roles='administrator' \ + --email="doe@anexusit.com" \ + --status="1" diff --git a/translations/user.delete.yml b/translations/user.delete.yml index 2c40c65..4d71f83 100644 --- a/translations/user.delete.yml +++ b/translations/user.delete.yml @@ -2,16 +2,26 @@ description: 'Delete users for the application' help: 'The user:delete command helps you delete users.' welcome: 'Welcome to the Drupal user delete' options: - user-id: 'User id to be deleted' - roles: 'Roles associated to users to be deleted' + user-id: 'User id to be deleted' + roles: 'Roles associated to users to be deleted' questions: - user-id: 'User id to be deleted (empty to skip)' - roles: 'Select role(s) associated with users to be deleted' + user-id: 'User id to be deleted (empty to skip)' + roles: 'Select role(s) associated with users to be deleted' messages: - user-id: 'User ID' - username: 'Username' - user-deleted: 'User "%s" was deleted successfully' - users-deleted: '"%s" users were deleted successfully' + user-id: 'User ID' + username: 'Username' + user-deleted: 'User "%s" was deleted successfully' + users-deleted: '"%s" users were deleted successfully' errors: - invalid-user-id: 'User id "%s" is invalid' - invalid-user: 'User id "%s" is invalid' + invalid-user-id: 'User id "%s" is invalid' + invalid-user: 'User id "%s" is invalid' +examples: + - description: 'Delete user specifying the id and the user role' + execution: | + drupal user:delete \ + --user-id="2" + --roles='authenticated' + - description: 'Delete user specifying its id' + execution: | + drupal user:delete \ + --user-id="3" diff --git a/translations/user.login.url.yml b/translations/user.login.url.yml index eeae3d8..93a62c4 100644 --- a/translations/user.login.url.yml +++ b/translations/user.login.url.yml @@ -1,7 +1,11 @@ description: 'Returns a one-time user login url.' options: - user-id: 'User ID.' + user-id: 'User ID.' messages: - url: 'One-time login for "%s": "%s"' + url: 'One-time login for "%s": "%s"' errors: - invalid-user: 'Cannot load user entity (User ID: "%s").' + invalid-user: 'Cannot load user entity (User ID: "%s").' +examples: + - description: 'Get one time login url for user id 1' + execution: | + drupal user:login:url 1 diff --git a/translations/user.password.hash.yml b/translations/user.password.hash.yml index 05f58b2..026360a 100644 --- a/translations/user.password.hash.yml +++ b/translations/user.password.hash.yml @@ -2,12 +2,16 @@ description: 'Generate a hash from a plaintext password.' help: 'The password:hash command helps you to generate hashes password from plaintext passwords.' welcome: 'Welcome to the Drupal password hash generator' options: - password: 'Password(s) in text format' + password: 'Password(s) in text format' questions: - invalid-pass: 'Password can''t be empty' - password: 'Enter password' - other-password: 'Other password (press to stop adding passwords)' + invalid-pass: 'Password can''t be empty' + password: 'Enter password' + other-password: 'Other password (press to stop adding passwords)' messages: - password: Password - hash: Hash + password: Password + hash: Hash errors: null +examples: + - description: 'Get hash of the word "p455w0rd"' + execution: | + drupal user:password:hash p455w0rd diff --git a/translations/user.password.reset.yml b/translations/user.password.reset.yml index 893c2b9..5664fb6 100644 --- a/translations/user.password.reset.yml +++ b/translations/user.password.reset.yml @@ -2,16 +2,20 @@ description: 'Reset password for a specific user.' help: 'The password:reset command helps you to reset password for a specific user.' welcome: 'Welcome to the Drupal password reset' options: - password: 'Password in text format' - user-id: 'User ID' + password: 'Password in text format' + user-id: 'User ID' questions: - invalid-uid: 'Invalid user id "%s", user id must be an integer' - invalid-pass: 'Password can''t be empty' - user: 'Enter User ID' - password: 'Enter password' - other-password: 'Other password (press to stop adding passwords)' + invalid-uid: 'Invalid user id "%s", user id must be an integer' + invalid-pass: 'Password can''t be empty' + user: 'Enter User ID' + password: 'Enter password' + other-password: 'Other password (press to stop adding passwords)' messages: - reset-successful: 'Password was updated successfully for user id "%s"' + reset-successful: 'Password was updated successfully for user id "%s"' errors: - invalid-user: 'Invalid user id "%s"' - empty-password: 'Password can not be empty' + invalid-user: 'Invalid user id "%s"' + empty-password: 'Password can not be empty' +examples: + - description: 'Update password specifying the user id and the new password' + execution: | + drupal user:password:reset 2 p455w0rd diff --git a/translations/user.role.yml b/translations/user.role.yml index 6124062..36fff83 100644 --- a/translations/user.role.yml +++ b/translations/user.role.yml @@ -2,12 +2,19 @@ description: 'Adds/removes a role for a given user' help: 'The user:role command helps you to add or remove a role to a user.' welcome: 'Welcome to the Drupal user rule' arguments: - roles: 'Roles to add or remove. Please provide the machine name (only one)' - operation: 'Add or remove' - user: 'The affected user (only one)' + roles: 'Roles to add or remove. Please provide the machine name (only one)' + operation: 'Add or remove' + user: 'The affected user (only one)' messages: - bad-arguments: 'Some arguments are missing! Please, provide all the following arguments: [add/remove] [username] [role]' - no-user-found: 'Username "%s" was not found!' - no-role-found: 'Role "%s" was not found!' - add-success: 'Username %1$s was added role %2$s sucessfully' - remove-success: 'Username %1$s was removed role %2$s sucessfully' + bad-arguments: 'Some arguments are missing! Please, provide all the following arguments: [add/remove] [username] [role]' + no-user-found: 'Username "%s" was not found!' + no-role-found: 'Role "%s" was not found!' + add-success: 'Username %1$s was added role %2$s sucessfully' + remove-success: 'Username %1$s was removed role %2$s sucessfully' +examples: + - description: 'Add administrator role to the user admin specifying the username and the role' + execution: | + drupal user:role add admin administrator + - description: 'Remove administrator role from the user admin specifying the username and the role' + execution: | + drupal user:role remove admin administrator From 55355c019be20b690e0341cc71eb5db67dcc0a53 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Wed, 12 Jul 2017 15:57:03 -0500 Subject: [PATCH 11/14] Use - instead of _ on yaml keys --- translations/cache.rebuild.yml | 2 +- translations/chain.yml | 6 +++--- translations/check.yml | 10 +++++----- translations/common.yml | 2 +- translations/config.export.content.type.yml | 2 +- translations/debug.container.yml | 6 +++--- translations/debug.features.yml | 2 +- translations/debug.rest.yml | 4 ++-- translations/help.yml | 2 +- translations/list.yml | 2 +- translations/migrate.execute.yml | 4 ++-- translations/rest.debug.yml | 4 ++-- translations/site.status.yml | 18 +++++++++--------- 13 files changed, 32 insertions(+), 32 deletions(-) diff --git a/translations/cache.rebuild.yml b/translations/cache.rebuild.yml index f3a6118..3e1b5ff 100644 --- a/translations/cache.rebuild.yml +++ b/translations/cache.rebuild.yml @@ -5,7 +5,7 @@ messages: welcome: 'Welcome to the cache:rebuild command' rebuild: 'Rebuilding cache(s), wait a moment please.' completed: 'Done clearing cache(s).' - invalid_cache: 'Cache "%s" is invalid.' + invalid-cache: 'Cache "%s" is invalid.' questions: cache: 'Select cache.' examples: diff --git a/translations/chain.yml b/translations/chain.yml index 3d1b0f7..e8a3190 100644 --- a/translations/chain.yml +++ b/translations/chain.yml @@ -4,9 +4,9 @@ options: questions: chain-file: 'Select chain file to execute' messages: - missing_file: 'You must provide a valid file path and name.' - invalid_file: 'The file "%s" does not exist.' - module_install: 'module:install command is not runnable inside a chain queue and must be run independently.' + missing-file: 'You must provide a valid file path and name.' + invalid-file: 'The file "%s" does not exist.' + module-install: 'module:install command is not runnable inside a chain queue and must be run independently.' missing-environment-placeholders: 'Missing environment placeholder(s) "%s"' set-environment-placeholders: 'Set environment placeholders as:' missing-inline-placeholders: 'Missing inline placeholder(s) "%s"' diff --git a/translations/check.yml b/translations/check.yml index 56c4534..b98c5bc 100644 --- a/translations/check.yml +++ b/translations/check.yml @@ -1,9 +1,9 @@ description: 'System requirement checker' messages: file: 'Checking requirements using file at:' - php_invalid: 'The current installed version "%s" is invalid, it requires "%s" or higher' - configuration_missing: 'The configuration "%s" is missing.' - configuration_overwritten: 'The PHP-Configuration (php.ini) "%s" was missing and overwritten with "%s".' - extension_missing: 'The extension "%s" is missing.' - extension_recommended: 'The extension "%s" is recommended to install.' + php-invalid: 'The current installed version "%s" is invalid, it requires "%s" or higher' + configuration-missing: 'The configuration "%s" is missing.' + configuration-overwritten: 'The PHP-Configuration (php.ini) "%s" was missing and overwritten with "%s".' + extension-missing: 'The extension "%s" is missing.' + extension-recommended: 'The extension "%s" is recommended to install.' success: 'Checks passed.' diff --git a/translations/common.yml b/translations/common.yml index fa60af9..bf7d62d 100644 --- a/translations/common.yml +++ b/translations/common.yml @@ -25,7 +25,7 @@ questions: inputs: confirm: 'Do you want to generate a form structure?' label: 'Input label' - machine_name: 'Input machine name' + machine-name: 'Input machine name' permission: 'Do you want to generate permissions?' type: 'New field type (press to stop adding fields)' invalid: 'Field Type "%s" is invalid.' diff --git a/translations/config.export.content.type.yml b/translations/config.export.content.type.yml index 5761a54..386c716 100644 --- a/translations/config.export.content.type.yml +++ b/translations/config.export.content.type.yml @@ -5,7 +5,7 @@ questions: content-type: 'Content Type to be exported' optional-config: 'Export content type in module as an optional configuration' messages: - content_type_exported: 'Exporting content type' + content-type-exported: 'Exporting content type' options: optional-config: 'Export content type as an optional YAML configuration in your module' examples: diff --git a/translations/debug.container.yml b/translations/debug.container.yml index 46ede4d..04b3b2a 100644 --- a/translations/debug.container.yml +++ b/translations/debug.container.yml @@ -4,8 +4,8 @@ arguments: method: 'Method name.' arguments: 'Array of Arguments in CSV or JSON format.' messages: - service_id: 'Service ID' - class_name: 'Class Name' + service-id: 'Service ID' + class-name: 'Class Name' service: 'Service' class: 'Class' interface: 'Interface(s)' @@ -16,7 +16,7 @@ messages: method: 'Method' return: 'Return' errors: - method_not_exists: "This method doesn't exists in this service." + method-not-exists: "This method doesn't exists in this service." examples: - description: 'Displays the views.views_data_helper services' execution: | diff --git a/translations/debug.features.yml b/translations/debug.features.yml index 915220b..b31f273 100644 --- a/translations/debug.features.yml +++ b/translations/debug.features.yml @@ -5,7 +5,7 @@ arguments: messages: bundle: 'Bundle' name: 'Name' - machine_name: 'Machine Name' + machine-name: 'Machine Name' status: 'Status' state: 'State' diff --git a/translations/debug.rest.yml b/translations/debug.rest.yml index e808b41..6c6f101 100644 --- a/translations/debug.rest.yml +++ b/translations/debug.rest.yml @@ -6,14 +6,14 @@ options: messages: id: 'Rest ID' label: Label - canonical_url: 'Canonical URL' + canonical-url: 'Canonical URL' status: Status provider: Provider enabled: Enabled disabled: Disabled rest-state: 'REST States' supported-formats: 'Supported Formats' - supported_auth: 'Supported Authentication Providers' + supported-auth: 'Supported Authentication Providers' not-found: 'Rest resource "%s" not found' examples: - description: 'Displays rest hooks' diff --git a/translations/help.yml b/translations/help.yml index da7f923..d8deefc 100644 --- a/translations/help.yml +++ b/translations/help.yml @@ -10,7 +10,7 @@ help: | To display the list of available commands, please use the list command. arguments: - command_name: 'The command name' + command-name: 'The command name' options: xml: 'To output list as XML' raw: 'To output raw command list' diff --git a/translations/list.yml b/translations/list.yml index cffc401..7683426 100644 --- a/translations/list.yml +++ b/translations/list.yml @@ -17,7 +17,7 @@ options: messages: usage: "Usage:\n" - usage_details: " command [options] [arguments]\n\n" + usage-details: " command [options] [arguments]\n\n" arguments: 'Arguments:' options: 'Options:' help: 'Help:' diff --git a/translations/migrate.execute.yml b/translations/migrate.execute.yml index 49156e4..393e089 100644 --- a/translations/migrate.execute.yml +++ b/translations/migrate.execute.yml @@ -11,7 +11,7 @@ options: db-prefix: 'Database Prefix' db-port: 'Database Port' exclude: 'Migration id(s) to exclude' - source-base_path: 'Local file directory containing your source site (e.g. /var/www/docroot), or your site address (for example http://example.com)' + source-base-path: 'Local file directory containing your source site (e.g. /var/www/docroot), or your site address (for example http://example.com)' questions: id: 'Migration Id' exclude-id: 'Migration Id to exclude (press to stop adding migrations to exclude)' @@ -25,7 +25,7 @@ questions: db-prefix: 'Database Prefix' db-port: 'Database Port' invalid-migration-id: 'Migration Id "%s" is invalid' - source-base_path: 'Local file directory containing your source site (e.g. /var/www/docroot), or your site address (for example http://example.com)' + source-base-path: 'Local file directory containing your source site (e.g. /var/www/docroot), or your site address (for example http://example.com)' messages: processing: 'Processing Migration "%s"' imported: 'Migration "%s" was imported correctly' diff --git a/translations/rest.debug.yml b/translations/rest.debug.yml index 7959b42..6fc9fc8 100644 --- a/translations/rest.debug.yml +++ b/translations/rest.debug.yml @@ -6,12 +6,12 @@ options: messages: id: 'Rest ID' label: Label - canonical_url: 'Canonical URL' + canonical-url: 'Canonical URL' status: Status provider: Provider enabled: Enabled disabled: Disabled rest-state: 'REST States' supported-formats: 'Supported Formats' - supported_auth: 'Supported Authentication Providers' + supported-auth: 'Supported Authentication Providers' not-found: 'Rest resource "%s" not found' diff --git a/translations/site.status.yml b/translations/site.status.yml index 22c15f9..8d8dffd 100644 --- a/translations/site.status.yml +++ b/translations/site.status.yml @@ -2,7 +2,7 @@ description: 'View current Drupal Installation status' messages: application: Application system: 'System Info' - hash_salt: 'Hash salt' + hash-salt: 'Hash salt' console: 'Drupal Console' database: 'Database connection' driver: 'Driver' @@ -12,15 +12,15 @@ messages: password: 'Password' theme: 'Themes' connection: 'Connection' - theme_default: 'Default theme' - theme_admin: 'Admin theme' + theme-default: 'Default theme' + theme-admin: 'Admin theme' directory: 'Directories' - directory_root: 'Site root directory' - directory_temporary: 'Site temporary directory' - directory_theme_default: 'Default theme directory' - directory_theme_admin: 'Admin theme directory' - current_version: 'Current Drupal ("%s")' - not_installed: 'Drupal is not installed' + directory-root: 'Site root directory' + directory-temporary: 'Site temporary directory' + directory-theme-default: 'Default theme directory' + directory-theme-admin: 'Admin theme directory' + current-version: 'Current Drupal ("%s")' + not-installed: 'Drupal is not installed' examples: - description: 'Get drupal installation status specifying the output format as table' execution: | From 239094cee019134a8375d5c6b30139829e9a18e1 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Thu, 13 Jul 2017 14:30:20 -0500 Subject: [PATCH 12/14] Adding example for module command --- translations/module.dependency.install.yml | 11 ++++++++++ translations/module.install.dependencies.yml | 7 ------ translations/module.update.yml | 23 ++++++++++++-------- 3 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 translations/module.dependency.install.yml delete mode 100644 translations/module.install.dependencies.yml diff --git a/translations/module.dependency.install.yml b/translations/module.dependency.install.yml new file mode 100644 index 0000000..671dfff --- /dev/null +++ b/translations/module.dependency.install.yml @@ -0,0 +1,11 @@ +description: 'Install dependencies module in the application' +arguments: + module: 'Module or modules to be enabled should be separated by a space' +messages: + no-depencies: 'Nothing to do. This modules has not dependencies to install' + installing: 'Installing module(s) "%s"' + success: 'The following module(s) were installed successfully: "%s"' +examples: + - description: 'Install the dependencies of the specfied module' + execution: | + drupal module:dependency:install modulename diff --git a/translations/module.install.dependencies.yml b/translations/module.install.dependencies.yml deleted file mode 100644 index ad0d225..0000000 --- a/translations/module.install.dependencies.yml +++ /dev/null @@ -1,7 +0,0 @@ -description: 'Install dependencies module in the application' -arguments: - module: 'Module or modules to be enabled should be separated by a space' -messages: - no-depencies: 'Nothing to do. This modules has not dependencies to install' - installing: 'Installing module(s) "%s"' - success: 'The following module(s) were installed successfully: "%s"' diff --git a/translations/module.update.yml b/translations/module.update.yml index 229fb47..0bd1729 100644 --- a/translations/module.update.yml +++ b/translations/module.update.yml @@ -1,14 +1,19 @@ description: 'Update core, module or modules in the application' arguments: - module: 'Module or modules to be updated should be separated by a space. Leave empty for updating the core and all your modules managed by Composer.' + module: 'Module or modules to be updated should be separated by a space. Leave empty for updating the core and all your modules managed by Composer.' options: - composer: 'Update the module using Composer' - simulate: 'Simulate the update process with Composer' + composer: 'Update the module using Composer' + simulate: 'Simulate the update process with Composer' questions: - module: 'Module name (press to stop adding modules)' - invalid-module: 'Invalid module "%s"' + module: 'Module name (press to stop adding modules)' + invalid-module: 'Invalid module "%s"' messages: - success: 'The following module(s) were installed successfully: "%s"' - composer: 'The module "%s" was managed successfully with Composer' - only-composer: 'This command only updates modules via Composer. Use --composer option.' - missing-module: 'Enter a module(s) name(s) to update.' + success: 'The following module(s) were installed successfully: "%s"' + composer: 'The module "%s" was managed successfully with Composer' + only-composer: 'This command only updates modules via Composer. Use --composer option.' + missing-module: 'Enter a module(s) name(s) to update.' +examples: + - description: 'Update module specifying module name and composer parameter' + execution: | + drupal module:update modulename \ + --composer From 035d42d8cc72d8c8ec590ef7be53a35233b9de43 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Fri, 14 Jul 2017 10:53:51 -0500 Subject: [PATCH 13/14] Adding translation messages for the commands: chain config:edit module:install taxonomy:term:delete --- translations/chain.yml | 2 ++ translations/config.edit.yml | 1 + translations/module.install.yml | 3 +++ translations/taxonomy.term.delete.yml | 8 +++++--- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/translations/chain.yml b/translations/chain.yml index e8a3190..74ca8a7 100644 --- a/translations/chain.yml +++ b/translations/chain.yml @@ -11,6 +11,8 @@ messages: set-environment-placeholders: 'Set environment placeholders as:' missing-inline-placeholders: 'Missing inline placeholder(s) "%s"' set-inline-placeholders: 'Pass inline placeholders as:' + select-value-for-placeholder: 'Select value for %s placeholder' + enter-value-for-placeholder: 'Enter value for %s placeholder' examples: - description: 'Providing a file option using full path.' execution: | diff --git a/translations/config.edit.yml b/translations/config.edit.yml index 9bddeef..4005867 100644 --- a/translations/config.edit.yml +++ b/translations/config.edit.yml @@ -6,6 +6,7 @@ questions: config-name: 'Choose a configuration Object' messages: no-directory: 'An error occurred while creating your directory at: %s' + choose-configuration: 'Choose a configuration' examples: - description: 'Edit system cron configurations with "vim" (default editor).' execution: 'drupal config:edit system.cron' diff --git a/translations/module.install.yml b/translations/module.install.yml index c2aad0d..4a86333 100644 --- a/translations/module.install.yml +++ b/translations/module.install.yml @@ -26,6 +26,9 @@ messages: installing: 'Installing module(s) "%s"' composer: 'The module was installed successfully with Composer' error-creating-folder: 'Error creating folder "%s", please check your permissions' + download-with-composer: 'Module %s was downloaded with Composer.' + not-installed-with-composer: 'Module %s seems not to be installed with Composer. Halting.' + invalid-name: 'Invalid module name: %s' examples: - description: 'Install module specifying the module name' execution: | diff --git a/translations/taxonomy.term.delete.yml b/translations/taxonomy.term.delete.yml index 0388666..106303f 100644 --- a/translations/taxonomy.term.delete.yml +++ b/translations/taxonomy.term.delete.yml @@ -2,9 +2,11 @@ description: 'Delete taxonomy terms from a vocabulary' vid: 'Enter vocabulary id' help: 'This command takes the VID as argument or all which will delete every term from every vocabulary' messages: - nothing: 'All taxonomy terms from "%s" vocabulary already deleted.' - processing: 'Deleting "%s" taxonomy term.' - invalid-vocabulary: 'Invalid "%s" vocabulary.' + nothing: 'All taxonomy terms from "%s" vocabulary already deleted.' + processing: 'Deleting "%s" taxonomy term.' + invalid-vocabulary: 'Invalid "%s" vocabulary.' + invalid-vid: 'Invalid vid: %s.' + deleting-all-translation: 'Deleting "%s" and all translations.' examples: - description: 'Delete all terms of the "tags" vocabulary' execution: | From 34478c8e059811ed60d1ab2e7b5963b42da5c4b6 Mon Sep 17 00:00:00 2001 From: "bvicco@anexusit.com" Date: Fri, 14 Jul 2017 11:07:52 -0500 Subject: [PATCH 14/14] Removing not needed translation keys --- translations/taxonomy.term.delete.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/translations/taxonomy.term.delete.yml b/translations/taxonomy.term.delete.yml index 106303f..5ebd28c 100644 --- a/translations/taxonomy.term.delete.yml +++ b/translations/taxonomy.term.delete.yml @@ -5,8 +5,6 @@ messages: nothing: 'All taxonomy terms from "%s" vocabulary already deleted.' processing: 'Deleting "%s" taxonomy term.' invalid-vocabulary: 'Invalid "%s" vocabulary.' - invalid-vid: 'Invalid vid: %s.' - deleting-all-translation: 'Deleting "%s" and all translations.' examples: - description: 'Delete all terms of the "tags" vocabulary' execution: |