|
| | __construct () |
| |
| | getSupportedVersions () |
| |
| | readData (string $a_entity, string $a_version, array $a_ids) |
| |
| | getXmlRecord (string $a_entity, string $a_version, array $a_set) |
| |
| | importRecord (string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version) |
| |
| | __construct () |
| |
| | init (string $a_entity, string $a_schema_version) |
| | Init. More...
|
| |
| | getSupportedVersions () |
| |
| | readData (string $a_entity, string $a_version, array $a_ids) |
| | Read data from DB. More...
|
| |
| | setExportDirectories (string $a_relative, string $a_absolute) |
| |
| | setImportDirectory (string $a_val) |
| |
| | getImportDirectory () |
| |
| | setDSPrefix (string $a_val) |
| |
| | getDSPrefix () |
| |
| | getDSPrefixString () |
| |
| | 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 fields. More...
|
| |
| | convertToLeadingUpper (string $a_str) |
| | Make xyz_abc a XyzAbc string. More...
|
| |
| | getXmlRepresentation (string $a_entity, string $a_schema_version, ?array $a_ids, string $a_field="", bool $a_omit_header=false, bool $a_omit_types=false) |
| | Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text"> <ftype name="field_2" type="date"> <ftype name="field_3" type="integer"> </types> <types ...> ... More...
|
| |
| | addRecordsXml (ilXmlWriter $a_writer, array $a_prefixes, string $a_entity, string $a_schema_version, array $a_ids, ?string $a_field="") |
| |
| | afterXmlRecordWriting (string $a_entity, string $a_version, array $a_set) |
| |
| | getNamespaces (array &$namespaces, string $a_entity, string $a_schema_version) |
| |
| | getXmlRecord (string $a_entity, string $a_version, array $a_set) |
| | Get xml record for version. More...
|
| |
| | getXmlTypes (string $a_entity, string $a_version) |
| | Get xml types. More...
|
| |
| | getXMLEntityName (string $a_entity, string $a_version) |
| | Get entity name for xml (may be overwritten) More...
|
| |
| | getXMLEntityTag (string $a_entity, string $a_schema_version) |
| | Get entity tag. More...
|
| |
| | setImport (ilSurveyImporter $a_val) |
| |
| | getImport () |
| |
| | setCurrentInstallationId (string $a_val) |
| |
| | getCurrentInstallationId () |
| |
| | 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. More...
|
| |
| | getCollection (array $record, string $entity, string $schema_version, string $field, string $value) |
| |
|
| | getXmlNamespace (string $a_entity, string $a_schema_version) |
| |
| | getTypes (string $a_entity, string $a_version) |
| |
| | getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null) |
| |
| | getTypes (string $a_entity, string $a_version) |
| | Get (abstract) types for (abstract) field names. More...
|
| |
| | getXmlNamespace (string $a_entity, string $a_schema_version) |
| |
| | getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null) |
| |
| | createObjectExportId (string $a_type, string $a_id) |
| | Build ilias export id. More...
|
| |
| | parseObjectExportId (string $a_id, ?string $a_fallback_id=null) |
| | Parse export id. More...
|
| |
| | stripTags (array $rec, array $omit_keys=[]) |
| |
Blog Data set class This class implements the following entities:
Definition at line 31 of file class.ilBlogDataSet.php.
| ilBlogDataSet::importRecord |
( |
string |
$a_entity, |
|
|
array |
$a_types, |
|
|
array |
$a_rec, |
|
|
ilImportMapping |
$a_mapping, |
|
|
string |
$a_schema_version |
|
) |
| |
Definition at line 327 of file class.ilBlogDataSet.php.
References ilImportMapping\addMapping(), ilDataSet\getImportDirectory(), ilObjectFactory\getInstanceByObjId(), ilImportMapping\getMapping(), IL_CAL_DATETIME, ilObjBlog\initStorage(), ILIAS\Repository\int(), ilDataSet\parseObjectExportId(), ilFileUtils\rCopy(), and ilDataSet\stripTags().
339 if ($new_id = $a_mapping->
getMapping(
"Services/Container",
"objs", $a_rec[
"Id"])) {
346 $newObj->setTitle($a_rec[
"Title"] ??
"");
347 $newObj->setDescription($a_rec[
"Description"] ??
"");
348 $newObj->setNotesStatus((
bool) ($a_rec[
"Notes"] ??
false));
349 $newObj->setBackgroundColor($a_rec[
"BgColor"] ??
"");
350 $newObj->setFontColor($a_rec[
"FontColor"] ??
"");
351 $newObj->setProfilePicture((
bool) ($a_rec[
"Ppic"] ??
false));
352 $newObj->setRSS((
bool) ($a_rec[
"RssActive"] ??
false));
353 $newObj->setApproval((
bool) ($a_rec[
"Approval"] ??
false));
354 $newObj->setImage($a_rec[
"Img"] ??
"");
356 $newObj->setAbstractShorten((
bool) ($a_rec[
"AbsShorten"] ??
false));
357 $newObj->setAbstractShortenLength((
int) ($a_rec[
"AbsShortenLen"] ?? 0));
358 $newObj->setAbstractImage((
bool) ($a_rec[
"AbsImage"] ?? 0));
359 $newObj->setAbstractImageWidth((
int) ($a_rec[
"AbsImgWidth"] ?? 0));
360 $newObj->setAbstractImageHeight((
int) ($a_rec[
"AbsImgHeight"] ?? 0));
361 $newObj->setNavMode((
int) ($a_rec[
"NavMode"] ?? 0));
362 if (($a_rec[
"NavListMonWithPost"] ?? 0) == 0) {
363 $newObj->setNavModeListMonthsWithPostings(3);
365 $newObj->setNavModeListMonthsWithPostings((
int) $a_rec[
"NavListMonWithPost"]);
368 if (($nav_list_months = $a_rec[
"NavListMon"] ?? null) !== null) {
369 $nav_list_months = (
int) $nav_list_months;
371 $newObj->setNavModeListMonths($nav_list_months);
372 $newObj->setKeywords((
bool) ($a_rec[
"Keywords"] ??
false));
373 $newObj->setAuthors((
bool) ($a_rec[
"Authors"] ??
false));
375 trim($a_rec[
"NavOrder"])
376 ? explode(
";", $a_rec[
"NavOrder"])
379 if (($ov_post = $a_rec[
"OvPost"] ?? null) !== null) {
380 $ov_post = (
int) $ov_post;
382 $newObj->setOverviewPostings($ov_post);
387 if ($a_rec[
"Img"] ??
false) {
388 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
396 if ($a_rec[
"Style"] ??
false) {
397 self::$style_map[$a_rec[
"Style"]][] = $newObj->getId();
401 $this->reading_time->activate($newObj->getId(), (bool) ($a_rec[
"ReadingTime"] ??
false));
403 $a_mapping->
addMapping(
"Modules/Blog",
"blog", $a_rec[
"Id"], (
string) $newObj->getId());
407 $blog_id = (
int) $a_mapping->
getMapping(
"Modules/Blog",
"blog", $a_rec[
"BlogId"]);
410 $newObj->setBlogId($blog_id);
411 $newObj->setTitle($a_rec[
"Title"] ??
"");
413 $newObj->setApproved((
bool) ($a_rec[
"Approved"] ?? null));
418 $newObj->setAuthor((
int) $author[
"id"]);
420 $newObj->create(
true);
424 for ($loop = 0; $loop < 1000; $loop++) {
425 $idx =
"Keyword" . $loop;
426 if (isset($a_rec[$idx])) {
427 $keyword = trim($a_rec[$idx]);
428 if ($keyword !==
'') {
429 $keywords[] = $keyword;
433 if (count($keywords)) {
434 $newObj->updateKeywords($keywords);
437 $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.
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=[])