ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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)
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor. More...
 
 setImport ($a_val)
 Set import. More...
 
 getImport ()
 Get import. 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...
 
 exportedFromSameInstallation ()
 Is exporting and importing installation identical? More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import xml representation. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 Called after all container objects have been implemented. More...
 

Data Fields

 $errors
 
 $warnings
 
 $stats
 

Protected Member Functions

 buildRef ($id, $type)
 

Additional Inherited Members

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

Detailed Description

Member Function Documentation

◆ addError()

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

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

96 {
97 $this->errors[] = array( 'lang_var' => $lang_var, 'import_id' => $import_id, 'action' => $action );
98 }

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

+ Here is the caller graph for this function:

◆ addWarning()

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

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

86 {
87 $this->warnings[] = array( 'lang_var' => $lang_var, 'import_id' => $import_id, 'action' => $action );
88 }

Referenced by ilOrgUnitSimpleImport\moveObject(), and ilOrgUnitSimpleImport\simpleImportElement().

+ Here is the caller graph for this function:

◆ buildRef()

ilOrgUnitImporter::buildRef (   $id,
  $type 
)
protected
Parameters
$id
$type
Returns
bool|int

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

34 {
35 if ($type == 'reference_id') {
36 if (!ilObjOrgUnit::_exists($id, true)) {
37 return false;
38 }
39
40 return $id;
41 } elseif ($type == 'external_id') {
43
45 return false;
46 }
47
48 $ref_ids = ilObject::_getAllReferences($obj_id);
49
50 if (!count($ref_ids)) {
51 return false;
52 }
53
54 foreach($ref_ids as $ref_id) {
56 return $ref_id;
57 }
58 return false;
59 } else {
60 return false;
61 }
62 }
static _exists($a_id, $a_reference=false)
_isInTrash($a_ref_id)
checks wether object is in trash
_hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjIdByImportId($a_import_id)
$ref_id
Definition: sahs_server.php:39

References $ref_id, ilObjOrgUnit\_exists(), ilObject\_getAllReferences(), ilObject\_hasUntrashedReference(), ilObject\_isInTrash(), and ilObject\_lookupObjIdByImportId().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getErrors()

ilOrgUnitImporter::getErrors ( )
Returns
array

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

104 {
105 return $this->errors;
106 }

References $errors.

◆ getStats()

ilOrgUnitImporter::getStats ( )
Returns
array

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

120 {
121 return $this->stats;
122 }

References $stats.

◆ getWarnings()

ilOrgUnitImporter::getWarnings ( )
Returns
array

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

112 {
113 return $this->warnings;
114 }

References $warnings.

◆ hasErrors()

ilOrgUnitImporter::hasErrors ( )
Returns
bool

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

68 {
69 return count($this->errors) != 0;
70 }

◆ hasWarnings()

ilOrgUnitImporter::hasWarnings ( )
Returns
bool

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

76 {
77 return count($this->warnings) != 0;
78 }

◆ importXmlRepresentation()

ilOrgUnitImporter::importXmlRepresentation (   $a_entity,
  $a_id,
  $a_xml,
  $a_mapping 
)
Parameters
$a_entity
$a_id
$a_xml
$a_mapping
Returns
string|void
Deprecated:

Reimplemented from ilXmlImporter.

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

135 {
136 }

Field Documentation

◆ $errors

ilOrgUnitImporter::$errors

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

Referenced by getErrors().

◆ $stats

ilOrgUnitImporter::$stats

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

Referenced by getStats().

◆ $warnings

ilOrgUnitImporter::$warnings

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

Referenced by getWarnings().


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