19 declare(strict_types=1);
    43         $this->storage = $DIC->resourceStorage();
    45         $obj_dic = ilObjectDIC::dic();
    46         $this->object_properties_agregator = $obj_dic[
'object_properties_agregator'];
    52         return [
'4.4.0', 
'5.1.0', 
'5.2.0', 
'5.4.0'];
    57         return 'http://www.ilias.de/xml/Services/Object/' . 
$entity;
    65         if ($entity == 
'transl_entry') {
    74                         'Description' => 
'text',
    76                         'LangDefault' => 
'integer'    80         if ($entity == 
'transl') {
    88                         'MasterLang' => 
'text'    92         if ($entity == 
'service_settings') {
   104         if ($entity == 
'common') {
   105             if ($version == 
'5.4.0') {
   111         if ($entity == 
'icon') {
   112             if ($version == 
'5.4.0') {
   114                     'ObjId' => 
'integer',
   115                     'Filename' => 
'text',
   120         if ($entity == 
'tile') {
   121             if ($version == 
'5.4.0') {
   123                     'ObjId' => 
'integer',
   136         if ($entity == 
'transl_entry') {
   143                         'SELECT obj_id, title, description, lang_code, lang_default' . PHP_EOL
   144                         . 
'FROM object_translation' . PHP_EOL
   145                         . 
'WHERE ' . $this->db->in(
'obj_id', $ids, 
false, 
'integer') . PHP_EOL
   151         if ($entity == 
'transl') {
   158                         'SELECT obj_id, master_lang' . PHP_EOL
   159                         . 
'FROM obj_content_master_lng' . PHP_EOL
   160                         . 
'WHERE ' . $this->db->in(
'obj_id', $ids, 
false, 
'integer') . PHP_EOL
   166         if ($entity == 
'service_settings') {
   172                     foreach ($ids as 
$id) {
   183                         if ($version == 
'5.2.0') {
   201         if ($entity == 
'common') {
   203             foreach ($ids as 
$id) {
   210         if ($entity == 
"tile") {
   212             foreach ($ids as 
$id) {
   213                 $rid = $this->object_properties_agregator->getFor((
int) $id)
   214                     ->getPropertyTileImage()->getTileImage()->getRid();
   229         if ($entity == 
'icon') {
   230             $customIconFactory = $DIC[
'object.customicons.factory'];
   232             foreach ($ids as 
$id) {
   235                 if ($customIcon->exists()) {
   238                         'Filename' => pathinfo($customIcon->getFullPath(), PATHINFO_BASENAME),
   239                         'Dir' => dirname($customIcon->getFullPath())
   248         $i = $this->storage->manage()->find($rid);
   249         $stream = $this->storage->consume()->stream(
   252         $title = $this->storage->manage()->getCurrentRevision($i)->getTitle();
   259         file_put_contents($temp_dir . DIRECTORY_SEPARATOR . $title, $stream->getStream()->getContents());
   271         $rec[
'ObjId'] = $rec[
'ObjId'] ?? null;
   275                     'transl' => [
'ids' => $rec[
'ObjId']],
   276                     'transl_entry' => [
'ids' => $rec[
'ObjId']],
   277                     'service_settings' => [
'ids' => $rec[
'ObjId']],
   278                     'tile' => [
'ids' => $rec[
'ObjId']],
   279                     'icon' => [
'ids' => $rec[
'ObjId']]
   298                 $new_id = $this->getNewObjId($mapping, $rec[
'ObjId']);
   301                     $transl->addLanguage(
   311                         (
bool) $rec[
'LangDefault'],
   319                 $new_id = $this->getNewObjId($mapping, $rec[
'ObjId']);
   322                     $transl->setMasterLanguage($rec[
'MasterLang']);
   327             case 'service_settings':
   339                 $new_id = (
int) $this->getNewObjId($mapping, $rec[
'ObjId']);
   341                     if (in_array($rec[
'Setting'], 
$settings)) {
   348                 $new_id = (
int) $this->getNewObjId($mapping, $rec[
'ObjId']);
   349                 $dir = str_replace(
'..', 
'', $rec[
'Dir']);
   353                     $customIconFactory = $DIC[
'object.customicons.factory'];
   355                     $customIcon->createFromImportDir($source_dir);
   360                 $new_id = (
int) $this->getNewObjId($mapping, $rec[
'ObjId']);
   361                 $dir = str_replace(
'..', 
'', $rec[
'Dir']);
   364                     $object_properties = $this->object_properties_agregator->getFor($new_id);
   365                     $ti = $object_properties->getPropertyTileImage()->getTileImage();
   366                     $ti->createFromImportDir($source_dir);
   367                     $object_properties->storePropertyTileImage(
   368                         $object_properties->getPropertyTileImage()->withTileImage($ti)
   375     public function getNewObjId(
ilImportMapping $mapping, 
string $old_id): 
int   380         $objDefinition = $DIC[
'objDefinition'];
   382         $new_id = $mapping->
getMapping(
'Services/Container', 
'objs', $old_id);
   384             $new_id = $mapping->
getMapping(
'Services/Object', 
'objs', $old_id);
   387             $new_id = $mapping->
getMapping(
'Services/Object', 
'obj', $old_id);
   391                 if (substr($k, 0, 8) == 
'Modules/') {
   392                     foreach ($m as $type => $map) {
   394                             if ($objDefinition->isRBACObject($type)) {
   395                                 $new_id = $mapping->
getMapping($k, $type, $old_id);
   402         return (
int) $new_id;
 readData(string $a_entity, string $a_version, array $a_ids)
Read data from DB. 
 
const CALENDAR_VISIBILITY
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
 
getTypes(string $entity, string $version)
Get field types for entity. 
 
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
getMapping(string $a_comp, string $a_entity, string $a_old_id)
 
copyTileToTempFolderForExport(string $rid)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
importRecord(string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
Needs to be overwritten for import use case. 
 
static getInstance(int $obj_id)
 
static _hasContainerSetting(int $a_id, string $a_keyword)
 
getDependencies(string $entity, string $version, ?array $rec=null, ?array $ids=null)
Determine the dependent sets of data. 
 
const AUTO_RATING_NEW_OBJECTS
 
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
 
getDirectDataFromQuery(string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
const INFO_TAB_VISIBILITY
 
static _lookupType(int $id, bool $reference=false)
 
ilObjectPropertiesAgregator $object_properties_agregator
 
getXmlNamespace(string $entity, string $schema_version)