36 if (
$type ==
'reference_id') {
42 } elseif (
$type ==
'external_id') {
51 if (!count($ref_ids)) {
55 foreach ($ref_ids as $ref_id) {
74 $ilDB = $DIC->database();
76 $query =
"SELECT * FROM object_data " .
77 "INNER JOIN object_reference as ref on ref.obj_id = object_data.obj_id and ref.deleted is null ".
78 'WHERE object_data.type = "orgu" and import_id = ' .
$ilDB->quote($external_id,
"text") .
" " .
79 "ORDER BY create_date DESC";
96 return count($this->errors) != 0;
105 return count($this->warnings) != 0;
116 $this->warnings[] = array(
'lang_var' => $lang_var,
'import_id' => $import_id,
'action' =>
$action );
127 $this->errors[] = array(
'lang_var' => $lang_var,
'import_id' => $import_id,
'action' =>
$action );
170 $container_mappings = $a_mapping->getMappingsOfEntity(
"Services/Container",
"objs");
171 foreach ($container_mappings as $old => $new) {
173 if (ilObject2::_lookupType($new) ==
"orgu") {
174 $a_mapping->addMapping(
"Modules/OrgUnit",
"orgu", $old, $new);
hasMoreThanOneMatch($external_id)
static _hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
if(!array_key_exists('StateId', $_REQUEST)) $id
static _exists($a_id, $a_reference=false, $type="orgu")
static _isInTrash($a_ref_id)
checks wether object is in trash
addWarning($lang_var, $import_id, $action=null)
addError($lang_var, $import_id, $action=null)
static _getAllReferences($a_id)
get all reference ids of object
foreach($_POST as $key=> $value) $res
importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
static _lookupType($a_id, $a_reference=false)
static _lookupObjIdByImportId($a_import_id)