You are here

function gc_import_process in GatherContent 8

Batch operation callback.

We are doing real import thing here.

Parameters

int $content_id: ID of content we want to import.

int $status_id: ID of status, if 0 then we don't want to change status.

string $uuid: UUID of operation.

int|null $parent_menu_item: ID of mlid.

array $context: Context of operation.

1 string reference to 'gc_import_process'
GathercontentContentImportConfirmForm::submitForm in src/Form/GathercontentContentImportConfirmForm.php
Form submission handler.

File

./gathercontent.module, line 545
Main module file for GatherContent module.

Code

function gc_import_process($content_id, $status_id, $uuid, $parent_menu_item = NULL, &$context) {
  if (($nid = _gc_fetcher($content_id, $uuid, $status_id, NULL, $parent_menu_item)) !== FALSE) {
    if ($status_id != 0) {

      // Change status.
      $content_obj = new Content();
      $content_obj
        ->updateStatus($content_id, $status_id);
    }
  }
  $context['results']['uuid'] = $uuid;
}