CMS  Version 3.9
import_background.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("process");
3 
4 if (!$process)
5 {
6  // We are in a user request - spawn the background process and return the ID
7 
8  $process = new ProcessManager();
9  $params = [ "xml_import_file_path" =>$_SESSION["xml_import_file_path"],
10  "xml_import_components" => $_SESSION["xml_import_components"]
11  ];
12  echo $process->run("/action/component/import_background", $params);
13 }
14 else
15 {
16  // We are in the spawned background process - begin indexing the library
17 
18  $mgr = new SerializationManager();
19  $mgr->importBackground();
20 }
21 ?>
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
Provides a central management class for event handlers and common functionality for the process compo...
SerializationManager handles import/export of DataItems via an XML file.
$_SESSION["useMobile"]
Definition: override.inc:7
$process
Definition: run.php:54