You are here

function cms_content_sync_migrate_acquia_content_hub_drush_command in CMS Content Sync 2.1.x

Same name and namespace in other branches
  1. 8 modules/cms_content_sync_migrate_acquia_content_hub/cms_content_sync_migrate_acquia_content_hub.drush.inc \cms_content_sync_migrate_acquia_content_hub_drush_command()
  2. 2.0.x modules/cms_content_sync_migrate_acquia_content_hub/cms_content_sync_migrate_acquia_content_hub.drush.inc \cms_content_sync_migrate_acquia_content_hub_drush_command()

Implements hook_drush_command().

File

modules/cms_content_sync_migrate_acquia_content_hub/cms_content_sync_migrate_acquia_content_hub.drush.inc, line 19
Contains Drush commands for Content Sync.

Code

function cms_content_sync_migrate_acquia_content_hub_drush_command() {
  $items['content_sync_migrate_acquia_content_hub'] = [
    'description' => dt('Migrate configuration from Acquia Content Hub to Content Sync'),
    'aliases' => [
      'mach',
    ],
    'options' => [
      'type' => [
        'required' => TRUE,
        'description' => 'The type of configuration you would like to migrate.',
      ],
      'sync' => [
        'required' => FALSE,
        'description' => 'Overwrite individual options, e.g. to set automatic pull/push for a specific vocabulary.',
      ],
      'backend_url' => [
        'required' => TRUE,
        'description' => 'The sync core url.',
      ],
      'authentication_type' => [
        'required' => TRUE,
        'description' => 'Allowed values: "cookie", "basic_auth"',
      ],
      'site_id' => [
        'description' => 'The unique identifier for this page. If no site_id is set, the command will try to get the client_name configuration form the Acquia Content Hub.',
      ],
      'node_push_behavior' => [
        'required' => FALSE,
        'description' => 'Allowed values: "automatically", "manually".',
      ],
      'import_updates_behavior' => [
        'required' => FALSE,
        'description' => 'Allowed values: "force_and_forbid_editing", "allow_override", "force", "ignore".',
      ],
      'force_update' => [
        'description' => 'If this is set to true, already existent flow configurations are going to be overwritten.',
      ],
    ],
    'examples' => [
      'Create push configuration' => 'drush mach --type="push" --vocabulary="sites" --backend_url="http://test:test@drupal-content-sync:8691/rest" --authentication_type="basic_auth" --site_id="example-exporter" --node_push_behavior="automatically"',
      'Create pull configuration' => 'drush mach --type="pull" --vocabulary="sites" --backend_url="http://test:test@drupal-content-sync:8691/rest" --authentication_type="basic_auth" --site_id="example-importer" --pull_updates_behavior="force_and_forbid_editing"',
    ],
  ];
  return $items;
}