You are here

function acsf_duplication_acsf_duplication_scrub_context_alter in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 acsf_duplication/acsf_duplication.module \acsf_duplication_acsf_duplication_scrub_context_alter()

Alters the scrub event context of `drush acsf-duplication-scrub-batch`.

Use this alter hook to add optional data to the scrub event. The data added here is available via the $this->event->context array in event handlers.

Parameters

array $data: An associative array of context data needed in the event handlers.

See also

drush_acsf_duplication_scrub_batch()

File

acsf_duplication/acsf_duplication.module, line 46
Provides site duplication handlers.

Code

function acsf_duplication_acsf_duplication_scrub_context_alter(array &$data) {
  $exact_copy = drush_get_option('exact-copy');
  $options['retain_users'] = drush_get_option('retain-users', $exact_copy);
  $options['retain_content'] = drush_get_option('retain-content', $exact_copy);
  $batch = drush_get_option('batch', 1000);
  $options['batch_comment'] = drush_get_option('batch-comment', $batch);
  $options['batch_node'] = drush_get_option('batch-node', $batch);
  $options['batch_user'] = drush_get_option('batch-user', $batch);
  $data['scrub_options'] = array_merge($data['scrub_options'], $options);
}