You are here

function acquia_contenthub_bulk_export in Acquia Content Hub 8

Process all candidate entities and insert/update/delete on Content Hub.

1 string reference to 'acquia_contenthub_bulk_export'
EntityManager::registerShutdownFunction in src/EntityManager.php
Register shutdown function.

File

./acquia_contenthub.module, line 73
Contains acquia_contenthub.module.

Code

function acquia_contenthub_bulk_export() {

  /** @var \Drupal\acquia_contenthub\EntityManager $entity_manager */
  $entity_manager = \Drupal::service('acquia_contenthub.entity_manager');
  $entity_manager
    ->bulkExport();
  $candidate_entities = $entity_manager
    ->getExportCandidateEntities();

  /** @var \Drupal\acquia_contenthub\Controller\ContentHubEntityExportController $export_controller */
  $export_controller = \Drupal::service('acquia_contenthub.acquia_contenthub_export_entities');

  // Export Entities.
  $use_export_queue = $export_controller
    ->exportEntities($candidate_entities);
}