3declare(strict_types=1);
34 return [
'4.4.0',
'5.1.0',
'5.2.0',
'5.4.0'];
39 return 'http://www.ilias.de/xml/Services/Object/' .
$entity;
47 if (
$entity ==
'transl_entry') {
56 'Description' =>
'text',
58 'LangDefault' =>
'integer'
70 'MasterLang' =>
'text'
74 if (
$entity ==
'service_settings') {
105 'ObjId' =>
'integer',
106 'Extension' =>
'text',
118 if (
$entity ==
'transl_entry') {
125 'SELECT obj_id, title, description, lang_code, lang_default' . PHP_EOL
126 .
'FROM object_translation' . PHP_EOL
127 .
'WHERE ' . $this->db->in(
'obj_id', $ids,
false,
'integer') . PHP_EOL
140 'SELECT obj_id, master_lang' . PHP_EOL
141 .
'FROM obj_content_master_lng' . PHP_EOL
142 .
'WHERE ' . $this->db->in(
'obj_id', $ids,
false,
'integer') . PHP_EOL
148 if (
$entity ==
'service_settings') {
154 foreach ($ids as
$id) {
185 foreach ($ids as
$id) {
193 $cs =
$DIC->object()->commonSettings();
195 foreach ($ids as
$id) {
196 $ti = $cs->tileImage()->getByObjId((
int)
$id);
200 'Extension' => $ti->getExtension(),
201 'Dir' => dirname($ti->getFullPath())
209 $customIconFactory =
$DIC[
'object.customicons.factory'];
211 foreach ($ids as
$id) {
214 if ($customIcon->exists()) {
217 'Filename' => pathinfo($customIcon->getFullPath(), PATHINFO_BASENAME),
218 'Dir' => dirname($customIcon->getFullPath())
234 $rec[
'ObjId'] = $rec[
'ObjId'] ?? null;
238 'transl' => [
'ids' => $rec[
'ObjId']],
239 'transl_entry' => [
'ids' => $rec[
'ObjId']],
240 'service_settings' => [
'ids' => $rec[
'ObjId']],
241 'tile' => [
'ids' => $rec[
'ObjId']],
242 'icon' => [
'ids' => $rec[
'ObjId']]
249 public function importRecord(
254 string $schema_version
260 $new_id = $this->getNewObjId($mapping, $rec[
'ObjId']);
263 $transl->addLanguage(
273 (
bool) $rec[
'LangDefault'],
281 $new_id = $this->getNewObjId($mapping, $rec[
'ObjId']);
284 $transl->setMasterLanguage($rec[
'MasterLang']);
289 case 'service_settings':
301 $new_id = (
int) $this->getNewObjId($mapping, $rec[
'ObjId']);
303 if (in_array($rec[
'Setting'],
$settings)) {
310 $new_id = (
int) $this->getNewObjId($mapping, $rec[
'ObjId']);
311 $dir = str_replace(
'..',
'', $rec[
'Dir']);
312 if ($dir !=
'' && $this->getImportDirectory() !=
'') {
313 $source_dir = $this->getImportDirectory() .
'/' . $dir;
316 $customIconFactory =
$DIC[
'object.customicons.factory'];
318 $customIcon->createFromImportDir($source_dir);
323 $new_id = (
int) $this->getNewObjId($mapping, $rec[
'ObjId']);
324 $dir = str_replace(
'..',
'', $rec[
'Dir']);
325 if ($new_id > 0 && $dir !=
'' && $this->getImportDirectory() !=
'') {
326 $source_dir = $this->getImportDirectory() .
'/' . $dir;
327 $cs =
$DIC->object()->commonSettings();
328 $ti = $cs->tileImage()->getByObjId($new_id);
329 $ti->createFromImportDir($source_dir, $rec[
'Extension']);
340 $objDefinition =
$DIC[
'objDefinition'];
342 $new_id = $mapping->
getMapping(
'Services/Container',
'objs', $old_id);
344 $new_id = $mapping->
getMapping(
'Services/Object',
'objs', $old_id);
347 $new_id = $mapping->
getMapping(
'Services/Object',
'obj', $old_id);
351 if (substr($k, 0, 8) ==
'Modules/') {
352 foreach ($m as
$type => $map) {
354 if ($objDefinition->isRBACObject(
$type)) {
362 return (
int) $new_id;
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _hasContainerSetting(int $a_id, string $a_keyword)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
readData(string $a_entity, string $a_version, array $a_ids)
Read data from DB.
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 ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getMapping(string $a_comp, string $a_entity, string $a_old_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getXmlNamespace(string $entity, string $schema_version)
getTypes(string $entity, string $version)
Get field types for entity.
getDependencies(string $entity, string $version, ?array $rec=null, ?array $ids=null)
Determine the dependent sets of data.
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
const AUTO_RATING_NEW_OBJECTS
const INFO_TAB_VISIBILITY
const CALENDAR_VISIBILITY
static getInstance(int $obj_id)
static _lookupType(int $id, bool $reference=false)