ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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)
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor.
 init ()
 Init.
 setInstallId ($a_val)
 Set installation id.
 getInstallId ()
 Get installation id.
 setInstallUrl ($a_val)
 Set installation url.
 getInstallUrl ()
 Get installation url.
 setSchemaVersion ($a_val)
 Set schema version.
 getSchemaVersion ()
 Get schema version.
 setImportDirectory ($a_val)
 Set import directory.
 getImportDirectory ()
 Get import directory.
 setSkipEntities ($a_val)
 Set skip entities.
 getSkipEntities ()
 Get skip entities.
 finalProcessing ($a_mapping)
 Final processing.

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

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

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

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

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

+ Here is the caller graph for this function:

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

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

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

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

+ Here is the caller graph for this function:

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

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

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

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

{
if ($type == 'reference_id') {
if (!ilObjOrgUnit::_exists($id, true)) {
return false;
}
return $id;
} elseif ($type == 'external_id') {
return false;
}
$ref_ids = ilObject::_getAllReferences($obj_id);
if (!count($ref_ids)) {
return false;
}
foreach($ref_ids as $ref_id) {
if(!ilObject::_isInTrash($ref_id))
return $ref_id;
}
return false;
} else {
return false;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilOrgUnitImporter::getErrors ( )
Returns
array

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

References $errors.

{
return $this->errors;
}
ilOrgUnitImporter::getStats ( )
Returns
array

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

References $stats.

{
return $this->stats;
}
ilOrgUnitImporter::getWarnings ( )
Returns
array

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

References $warnings.

{
}
ilOrgUnitImporter::hasErrors ( )
Returns
bool

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

{
return count($this->errors) != 0;
}
ilOrgUnitImporter::hasWarnings ( )
Returns
bool

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

{
return count($this->warnings) != 0;
}
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.

{
}

Field Documentation

ilOrgUnitImporter::$errors

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

Referenced by getErrors().

ilOrgUnitImporter::$stats

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

Referenced by getStats().

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: