282 if ($new_id = $a_mapping->
getMapping(
"Services/Container",
"objs", $a_rec[
"Id"])) {
289 $newObj->setTitle($a_rec[
"Title"] ??
"");
290 $newObj->setDescription($a_rec[
"Description"] ??
"");
291 $newObj->setNotesStatus((
bool) ($a_rec[
"Notes"] ??
false));
292 $newObj->setBackgroundColor($a_rec[
"BgColor"] ??
"");
293 $newObj->setFontColor($a_rec[
"FontColor"] ??
"");
294 $newObj->setProfilePicture((
bool) ($a_rec[
"Ppic"] ??
false));
295 $newObj->setRSS((
bool) ($a_rec[
"RssActive"] ??
false));
296 $newObj->setApproval((
bool) ($a_rec[
"Approval"] ??
false));
297 $newObj->setImage($a_rec[
"Img"] ??
"");
299 $newObj->setAbstractShorten((
bool) ($a_rec[
"AbsShorten"] ??
false));
300 $newObj->setAbstractShortenLength((
int) ($a_rec[
"AbsShortenLen"] ?? 0));
301 $newObj->setAbstractImage((
int) ($a_rec[
"AbsImage"] ?? 0));
302 $newObj->setAbstractImageWidth((
int) ($a_rec[
"AbsImgWidth"] ?? 0));
303 $newObj->setAbstractImageHeight((
int) ($a_rec[
"AbsImgHeight"] ?? 0));
304 $newObj->setNavMode((
int) ($a_rec[
"NavMode"] ?? 0));
305 if (($a_rec[
"NavListMonWithPost"] ?? 0) == 0) {
306 $newObj->setNavModeListMonthsWithPostings(3);
308 $newObj->setNavModeListMonthsWithPostings((
int) $a_rec[
"NavListMonWithPost"]);
311 if (($nav_list_months = $a_rec[
"NavListMon"] ?? null) !== null) {
312 $nav_list_months = (
int) $nav_list_months;
314 $newObj->setNavModeListMonths($nav_list_months);
315 $newObj->setKeywords((
bool) ($a_rec[
"Keywords"] ??
false));
316 $newObj->setAuthors((
bool) ($a_rec[
"Authors"] ??
false));
318 trim($a_rec[
"NavOrder"])
319 ? explode(
";", $a_rec[
"NavOrder"])
322 if (($ov_post = $a_rec[
"OvPost"] ?? null) !== null) {
323 $ov_post = (
int) $ov_post;
325 $newObj->setOverviewPostings($ov_post);
330 if ($a_rec[
"Img"] ??
false) {
331 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
339 if ($a_rec[
"Style"] ??
false) {
340 self::$style_map[$a_rec[
"Style"]][] = $newObj->getId();
342 $a_mapping->
addMapping(
"Modules/Blog",
"blog", $a_rec[
"Id"], $newObj->getId());
346 $blog_id = (
int) $a_mapping->
getMapping(
"Modules/Blog",
"blog", $a_rec[
"BlogId"]);
349 $newObj->setBlogId($blog_id);
350 $newObj->setTitle($a_rec[
"Title"] ??
"");
352 $newObj->setApproved($a_rec[
"Approved"] ?? null);
357 $newObj->setAuthor((
int) $author[
"id"]);
359 $newObj->create(
true);
363 for ($loop = 0; $loop < 1000; $loop++) {
364 $idx =
"Keyword" . $loop;
365 if (isset($a_rec[$idx])) {
366 $keyword = trim($a_rec[$idx]);
367 if ($keyword !==
'') {
368 $keywords[] = $keyword;
372 if (count($keywords)) {
373 $newObj->updateKeywords($keywords);
376 $a_mapping->
addMapping(
"Services/COPage",
"pg",
"blp:" . $a_rec[
"Id"],
"blp:" . $newObj->getId());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parseObjectExportId(string $a_id, ?string $a_fallback_id=null)
Parse export id.
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
getMapping(string $a_comp, string $a_entity, string $a_old_id)
static initStorage(int $a_id, string $a_subdir=null)
Init file system storage.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
stripTags(array $rec, array $omit_keys=[])