CMS  Version 3.9
data_import_select_target.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("data_sync");
3 
4 $menu_item = "Data Import";
5 
7 
8 $options = array();
9 
10 foreach($targets as $target)
11 {
12  $obj = new $target;
13 
14  $options[$target] = $obj->prettifyClassName(true);
15 }
16 
17 
19 $dummy->filter = new InclusionFilter("mapping_id");
20 
21 $page_title = "Select Data Type for Import";
22 
23 $form = new AutoForm($dummy);
24 
25 $form->submitLabel = "Select Data Type";
26 $form->customSaveHandler = selectImportTarget;
27 
28 $targetSelect = new RadioButtonFieldRenderer($form, "target", "Data to Import", $options);
29 
31 
32 if ($method == "POST")
33 {
34  if ($form->save())
35  {
36  $tabs->next();
37  }
38 }
39 
40 $script .= $form->writeScript();
41 
42 $tabs->writeHTML();
43 ?>
44 <div class="tab_border">
45 <?
46 $form->drawForm();
47 ?>
48 </div>
49 <?
50 
52 {
53  $_SESSION["data_import_class"] = $_POST["target"];
54  //AJG: Make sure that the import_profile_id is reset so that it isn't brought over from a previous import
55  unset($_SESSION["import_profile_id"]);
56 
57  return true;
58 }
$_POST["owner_id"]
Definition: blog_form.inc:54
foreach($targets as $target) $dummy
selectImportTarget($form)
if($method=="POST") $script
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
$method
Pull out a simple reference to the request method.
Definition: core.inc:1573
$_SESSION["useMobile"]
Definition: override.inc:7