This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/drupal/console-en/translations/generate.plugin.migrate.source.yml
2018-11-23 12:29:20 +00:00

42 lines
1.8 KiB
YAML

description: 'Generate a migrate source plugin'
help: 'The <info>generate:migrate:plugin:source</info> command helps you generate a new migrate source plugin.'
welcome: 'Welcome to the Drupal Migrate Source Plugin generator'
options:
module: 'The Module name.'
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: 'Enter the module name'
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'
id: 'Enter the field id or press <info>enter</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"'