ILIAS  release_8 Revision v8.24
ilSoapStructureObject Class Reference

Abstract classs for soap structure objects. More...

+ Inheritance diagram for ilSoapStructureObject:
+ Collaboration diagram for ilSoapStructureObject:

Public Member Functions

 __construct (int $objId, string $type, string $title, string $description, ?int $parentRefId=null)
 
 addStructureObject (ilSoapStructureObject $structureObject)
 
 getStructureObjects ()
 
 setObjId (int $value)
 
 getObjId ()
 
 setTitle (string $value)
 
 getTitle ()
 
 setDescription (string $value)
 
 getDescription ()
 
 setType (string $value)
 
 getType ()
 
 getGotoLink ()
 
 getInternalLink ()
 
 _getXMLAttributes ()
 
 _getTagName ()
 
 setParentRefId (int $parentRefId)
 
 getParentRefId ()
 
 exportXML (ilXmlWriter $xml_writer)
 

Data Fields

int $obj_id
 
string $title
 
string $type
 
string $description
 
int $parentRefId
 
array $structureObjects = array()
 

Detailed Description

Abstract classs for soap structure objects.

Author
Roland Kuestermann (rku@a.nosp@m.ifb..nosp@m.uni-k.nosp@m.arls.nosp@m.ruhe..nosp@m.de)

Definition at line 28 of file class.ilSoapStructureObject.php.

Constructor & Destructor Documentation

◆ __construct()

ilSoapStructureObject::__construct ( int  $objId,
string  $type,
string  $title,
string  $description,
?int  $parentRefId = null 
)

Member Function Documentation

◆ _getTagName()

ilSoapStructureObject::_getTagName ( )

Reimplemented in ilSoapRepositoryStructureObject.

Definition at line 120 of file class.ilSoapStructureObject.php.

120 : string
121 {
122 return "StructureObject";
123 }

Referenced by exportXML().

+ Here is the caller graph for this function:

◆ _getXMLAttributes()

ilSoapStructureObject::_getXMLAttributes ( )
Returns
array{type: string, obj_id: int}

Reimplemented in ilSoapRepositoryStructureObject.

Definition at line 112 of file class.ilSoapStructureObject.php.

112 : array
113 {
114 return array(
115 'type' => $this->getType(),
116 'obj_id' => $this->getObjId()
117 );
118 }

References getObjId(), and getType().

Referenced by exportXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addStructureObject()

ilSoapStructureObject::addStructureObject ( ilSoapStructureObject  $structureObject)

Definition at line 47 of file class.ilSoapStructureObject.php.

47 : void
48 {
49 $this->structureObjects [$structureObject->getObjId()] = $structureObject;
50 }

References getObjId().

+ Here is the call graph for this function:

◆ exportXML()

ilSoapStructureObject::exportXML ( ilXmlWriter  $xml_writer)

Definition at line 135 of file class.ilSoapStructureObject.php.

135 : void
136 {
137 $attrs = $this->_getXMLAttributes();
138
139 $xml_writer->xmlStartTag($this->_getTagName(), $attrs);
140
141 $xml_writer->xmlElement('Title', null, $this->getTitle());
142 $xml_writer->xmlElement('Description', null, $this->getDescription());
143 $xml_writer->xmlElement('InternalLink', null, $this->getInternalLink());
144 $xml_writer->xmlElement('GotoLink', null, $this->getGotoLink());
145
146 $xml_writer->xmlStartTag("StructureObjects");
147
149
150 foreach ($structureObjects as $structureObject) {
151 $structureObject->exportXML($xml_writer);
152 }
153
154 $xml_writer->xmlEndTag("StructureObjects");
155
156 $xml_writer->xmlEndTag($this->_getTagName());
157 }
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.

References $structureObjects, _getTagName(), _getXMLAttributes(), getDescription(), getGotoLink(), getInternalLink(), getStructureObjects(), getTitle(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().

+ Here is the call graph for this function:

◆ getDescription()

ilSoapStructureObject::getDescription ( )

Definition at line 82 of file class.ilSoapStructureObject.php.

82 : string
83 {
84 return $this->description;
85 }

References $description.

Referenced by exportXML().

+ Here is the caller graph for this function:

◆ getGotoLink()

ilSoapStructureObject::getGotoLink ( )

Reimplemented in ilSoapGLOTermDefinitionStructureObject, ilSoapLMChapterStructureObject, and ilSoapRepositoryStructureObject.

Definition at line 97 of file class.ilSoapStructureObject.php.

97 : string
98 {
99 return ILIAS_HTTP_PATH . "/" . "goto.php?target=" . $this->getType() .
100 "_" . $this->getObjId() .
101 (is_numeric($this->getParentRefId()) ? "_" . $this->getParentRefId() : "") . "&client_id=" . CLIENT_ID;
102 }
const CLIENT_ID
Definition: constants.php:41

References CLIENT_ID, getObjId(), getParentRefId(), and getType().

Referenced by exportXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInternalLink()

ilSoapStructureObject::getInternalLink ( )

Reimplemented in ilSoapGLOTermDefinitionStructureObject, ilSoapGLOTermStructureObject, ilSoapLMChapterStructureObject, ilSoapLMPageStructureObject, and ilSoapRepositoryStructureObject.

Definition at line 104 of file class.ilSoapStructureObject.php.

104 : string
105 {
106 return '';
107 }

Referenced by exportXML().

+ Here is the caller graph for this function:

◆ getObjId()

◆ getParentRefId()

ilSoapStructureObject::getParentRefId ( )

Definition at line 130 of file class.ilSoapStructureObject.php.

130 : ?int
131 {
132 return $this->parentRefId;
133 }

References $parentRefId.

Referenced by getGotoLink().

+ Here is the caller graph for this function:

◆ getStructureObjects()

ilSoapStructureObject::getStructureObjects ( )

Definition at line 52 of file class.ilSoapStructureObject.php.

52 : array
53 {
55 }

References $structureObjects.

Referenced by exportXML().

+ Here is the caller graph for this function:

◆ getTitle()

ilSoapStructureObject::getTitle ( )

◆ getType()

ilSoapStructureObject::getType ( )

◆ setDescription()

ilSoapStructureObject::setDescription ( string  $value)

Definition at line 77 of file class.ilSoapStructureObject.php.

77 : void
78 {
79 $this->description = $value;
80 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setObjId()

ilSoapStructureObject::setObjId ( int  $value)

Definition at line 57 of file class.ilSoapStructureObject.php.

57 : void
58 {
59 $this->obj_id = $value;
60 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setParentRefId()

ilSoapStructureObject::setParentRefId ( int  $parentRefId)

Definition at line 125 of file class.ilSoapStructureObject.php.

125 : void
126 {
127 $this->parentRefId = $parentRefId;
128 }

References $parentRefId.

◆ setTitle()

ilSoapStructureObject::setTitle ( string  $value)

Definition at line 67 of file class.ilSoapStructureObject.php.

67 : void
68 {
69 $this->title = $value;
70 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setType()

ilSoapStructureObject::setType ( string  $value)

Definition at line 87 of file class.ilSoapStructureObject.php.

87 : void
88 {
89 $this->type = $value;
90 }

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $description

string ilSoapStructureObject::$description

◆ $obj_id

int ilSoapStructureObject::$obj_id

Definition at line 30 of file class.ilSoapStructureObject.php.

Referenced by getObjId().

◆ $parentRefId

int ilSoapStructureObject::$parentRefId

Definition at line 34 of file class.ilSoapStructureObject.php.

Referenced by __construct(), getParentRefId(), and setParentRefId().

◆ $structureObjects

array ilSoapStructureObject::$structureObjects = array()

Definition at line 36 of file class.ilSoapStructureObject.php.

Referenced by exportXML(), and getStructureObjects().

◆ $title

string ilSoapStructureObject::$title

◆ $type

string ilSoapStructureObject::$type

The documentation for this class was generated from the following file: