ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilCourseReferenceXmlWriter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once './Services/ContainerReference/classes/class.ilContainerReferenceXmlWriter.php';
5
13{
14
22 public function __construct(ilObjCourseReference $ref = null)
23 {
25 }
26
27
31 public function export($a_with_header = true)
32 {
33 if ($this->getMode() == self::MODE_EXPORT) {
34 if ($a_with_header) {
35 $this->buildHeader();
36 }
37 $this->buildReference();
38 $this->buildTarget();
39 $this->buildTitle();
40 $this->buildCourseSettings();
41 $this->buildFooter();
42 }
43 }
44
48 protected function buildCourseSettings()
49 {
50 $this->xmlElement('MemberUpdate', [], $this->getReference()->isMemberUpdateEnabled() ? 1 : 0);
51 }
52
53
59 protected function buildHeader()
60 {
61 global $ilSetting;
62
63 $this->xmlSetDtdDef("<!DOCTYPE course reference PUBLIC \"-//ILIAS//DTD Group//EN\" \"" . ILIAS_HTTP_PATH . "/xml/ilias_course_reference_4_3.dtd\">");
64 $this->xmlSetGenCmt("Export of ILIAS course reference " . $this->getReference()->getId() . " of installation " . $ilSetting->get('inst_id') . ".");
65 $this->xmlHeader();
66
67 return true;
68 }
69}
An exception for terminatinating execution or to throw for unit testing.
Class for container reference export.
Class for container reference export.
buildHeader()
Build xml header @global <type> $ilSetting.
buildCourseSettings()
Add member update setting.
__construct(ilObjCourseReference $ref=null)
constructor
export($a_with_header=true)
Start writing xml.
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlHeader()
Writes xml header @access public.
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlSetDtdDef($dtdDef)
Sets dtd definition.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:17