You are here

function lingotek_get_sync_upload_config_batch_elements in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.batch.inc \lingotek_get_sync_upload_config_batch_elements()
  2. 7.3 lingotek.batch.inc \lingotek_get_sync_upload_config_batch_elements()
  3. 7.4 lingotek.batch.inc \lingotek_get_sync_upload_config_batch_elements()
  4. 7.6 lingotek.batch.inc \lingotek_get_sync_upload_config_batch_elements()

Sync - Upload Config Batch Elements: Creates the batch elements for config (ie. menus, taxonomies, etc.), that need to be uploaded.

1 call to lingotek_get_sync_upload_config_batch_elements()
lingotek_sync_batch_create in ./lingotek.batch.inc
Batch Create - Sync: Uploads new and changed documents for translation and Downloads translated documents.

File

./lingotek.batch.inc, line 163
Central location for batch create functions, before control is handed off to individual batch command files.

Code

function lingotek_get_sync_upload_config_batch_elements($upload_configs = array()) {

  // pull outstanding imports from localize.drupal.org, if desired
  if (variable_get('lingotek_use_translation_from_drupal')) {
    module_load_include('admin.inc', 'lingotek');
    $modules = lingotek_admin_get_enabled_modules();
    lingotek_admin_load_l10n_update_batch($modules);

    // sets a separate batch for processing module imports from Drupal
  }
  $operations = array();
  if (is_array($upload_configs)) {
    foreach ($upload_configs as $cid) {
      $operations[] = array(
        'lingotek_sync_upload_config_chunk',
        array(
          $cid,
        ),
      );
    }
  }
  return $operations;
}