ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilOrgUnitImporter Class Reference

Class ilOrgUnitImporter. More...

+ Inheritance diagram for ilOrgUnitImporter:
+ Collaboration diagram for ilOrgUnitImporter:

Public Member Functions

 hasErrors ()
 
 hasWarnings ()
 
 addWarning ($lang_var, $import_id, $action=null)
 
 addError ($lang_var, $import_id, $action=null)
 
 getErrors ()
 
 getWarnings ()
 
 getStats ()
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML. More...
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor. More...
 
 init ()
 Init. More...
 
 setInstallId ($a_val)
 Set installation id. More...
 
 getInstallId ()
 Get installation id. More...
 
 setInstallUrl ($a_val)
 Set installation url. More...
 
 getInstallUrl ()
 Get installation url. More...
 
 setSchemaVersion ($a_val)
 Set schema version. More...
 
 getSchemaVersion ()
 Get schema version. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setSkipEntities ($a_val)
 Set skip entities. More...
 
 getSkipEntities ()
 Get skip entities. More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import xml representation. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 

Data Fields

 $errors
 
 $warnings
 
 $stats
 

Protected Member Functions

 buildRef ($id, $type)
 

Additional Inherited Members

- Protected Attributes inherited from ilXmlImporter
 $skip_entities = array()
 

Detailed Description

Member Function Documentation

◆ addError()

ilOrgUnitImporter::addError (   $lang_var,
  $import_id,
  $action = null 
)

Definition at line 63 of file class.ilOrgUnitImporter.php.

Referenced by ilOrgUnitSimpleImport\simpleImport(), ilOrgUnitSimpleImport\simpleImportElement(), ilOrgUnitSimpleUserImport\simpleUserImport(), and ilOrgUnitSimpleUserImport\simpleUserImportElement().

63  {
64  $this->errors[] = array("lang_var" => $lang_var, "import_id" => $import_id, "action" => $action);
65  }
+ Here is the caller graph for this function:

◆ addWarning()

ilOrgUnitImporter::addWarning (   $lang_var,
  $import_id,
  $action = null 
)

Definition at line 59 of file class.ilOrgUnitImporter.php.

Referenced by ilOrgUnitSimpleImport\simpleImportElement().

59  {
60  $this->warnings[] = array("lang_var" => $lang_var, "import_id" => $import_id, "action" => $action);
61  }
+ Here is the caller graph for this function:

◆ buildRef()

ilOrgUnitImporter::buildRef (   $id,
  $type 
)
protected

Definition at line 23 of file class.ilOrgUnitImporter.php.

References ilObjOrgUnit\_exists(), ilObject\_getAllReferences(), and ilObject\_lookupObjIdByImportId().

Referenced by ilOrgUnitSimpleImport\simpleImportElement(), and ilOrgUnitSimpleUserImport\simpleUserImportElement().

23  {
24  if($type == "reference_id")
25  {
26  if(!ilObjOrgUnit::_exists($id, true))
27  {
28  return false;
29  }
30  return $id;
31  }
32  elseif($type == "external_id")
33  {
34  $obj_id = ilObject::_lookupObjIdByImportId($id);
35  $ref_ids = ilObject::_getAllReferences($obj_id);
36  if(!count($ref_ids))
37  {
38  return false;
39  }
40  if(count($ref_ids))
41  {
42  return array_shift($ref_ids);
43  }
44  }
45  else
46  {
47  return false;
48  }
49  }
static _getAllReferences($a_id)
get all reference ids of object
static _exists($a_id, $a_reference=false)
static _lookupObjIdByImportId($a_import_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getErrors()

ilOrgUnitImporter::getErrors ( )
Returns
array

Definition at line 70 of file class.ilOrgUnitImporter.php.

References $errors.

71  {
72  return $this->errors;
73  }

◆ getStats()

ilOrgUnitImporter::getStats ( )
Returns
array

Definition at line 86 of file class.ilOrgUnitImporter.php.

References $stats.

87  {
88  return $this->stats;
89  }

◆ getWarnings()

ilOrgUnitImporter::getWarnings ( )
Returns
array

Definition at line 78 of file class.ilOrgUnitImporter.php.

References $warnings.

79  {
80  return $this->warnings;
81  }

◆ hasErrors()

ilOrgUnitImporter::hasErrors ( )

Definition at line 51 of file class.ilOrgUnitImporter.php.

51  {
52  return count($this->errors)!=0;
53  }

◆ hasWarnings()

ilOrgUnitImporter::hasWarnings ( )

Definition at line 55 of file class.ilOrgUnitImporter.php.

55  {
56  return count($this->warnings)!=0;
57  }

◆ importXmlRepresentation()

ilOrgUnitImporter::importXmlRepresentation (   $a_entity,
  $a_id,
  $a_xml,
  $a_mapping 
)

Import XML.

Parameters

Definition at line 97 of file class.ilOrgUnitImporter.php.

98  {
99 
100  }

Field Documentation

◆ $errors

ilOrgUnitImporter::$errors

Definition at line 14 of file class.ilOrgUnitImporter.php.

Referenced by getErrors().

◆ $stats

ilOrgUnitImporter::$stats

Definition at line 20 of file class.ilOrgUnitImporter.php.

Referenced by getStats().

◆ $warnings

ilOrgUnitImporter::$warnings

Definition at line 17 of file class.ilOrgUnitImporter.php.

Referenced by getWarnings().


The documentation for this class was generated from the following file: