ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCourseReferenceXmlWriter.php
Go to the documentation of this file.
1<?php
2
26{
34 public function __construct(?ilObjCourseReference $ref = null)
35 {
37 }
38
39
43 public function export(bool $a_with_header = true): void
44 {
45 if ($this->getMode() == self::MODE_EXPORT) {
46 if ($a_with_header) {
47 $this->buildHeader();
48 }
49 $this->buildReference();
50 $this->buildTarget();
51 $this->buildTitle();
52 $this->buildCourseSettings();
53 $this->buildFooter();
54 }
55 }
56
60 protected function buildCourseSettings()
61 {
62 $this->xmlElement('MemberUpdate', [], $this->getReference()->isMemberUpdateEnabled() ? 1 : 0);
63 }
64
65
71 protected function buildHeader(): void
72 {
73 global $ilSetting;
74
75 $this->xmlSetGenCmt("Export of ILIAS course reference " . $this->getReference()->getId() . " of installation " . $ilSetting->get('inst_id') . ".");
76 $this->xmlHeader();
77 }
78}
Class for container reference export.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildCourseSettings()
Add member update setting.
__construct(?ilObjCourseReference $ref=null)
constructor
export(bool $a_with_header=true)
Start writing xml.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlHeader()
Writes xml header.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:31