ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSoapStructureObject Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 22 of file class.ilSoapStructureObject.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

References $parentRefId, setDescription(), setObjId(), setTitle(), and setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getTagName()

ilSoapStructureObject::_getTagName ( )

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

Referenced by exportXML().

114  : string
115  {
116  return "StructureObject";
117  }
+ Here is the caller graph for this function:

◆ _getXMLAttributes()

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

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

References getObjId(), and getType().

Referenced by exportXML().

106  : array
107  {
108  return array(
109  'type' => $this->getType(),
110  'obj_id' => $this->getObjId()
111  );
112  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addStructureObject()

ilSoapStructureObject::addStructureObject ( ilSoapStructureObject  $structureObject)

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

References getObjId().

41  : void
42  {
43  $this->structureObjects [$structureObject->getObjId()] = $structureObject;
44  }
+ Here is the call graph for this function:

◆ exportXML()

ilSoapStructureObject::exportXML ( ilXmlWriter  $xml_writer)

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

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

129  : void
130  {
131  $attrs = $this->_getXMLAttributes();
132 
133  $xml_writer->xmlStartTag($this->_getTagName(), $attrs);
134 
135  $xml_writer->xmlElement('Title', null, $this->getTitle());
136  $xml_writer->xmlElement('Description', null, $this->getDescription());
137  $xml_writer->xmlElement('InternalLink', null, $this->getInternalLink());
138  $xml_writer->xmlElement('GotoLink', null, $this->getGotoLink());
139 
140  $xml_writer->xmlStartTag("StructureObjects");
141 
143 
144  foreach ($structureObjects as $structureObject) {
145  $structureObject->exportXML($xml_writer);
146  }
147 
148  $xml_writer->xmlEndTag("StructureObjects");
149 
150  $xml_writer->xmlEndTag($this->_getTagName());
151  }
xmlEndTag(string $tag)
Writes an endtag.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
+ Here is the call graph for this function:

◆ getDescription()

ilSoapStructureObject::getDescription ( )

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

References $description.

Referenced by exportXML().

76  : string
77  {
78  return $this->description;
79  }
+ Here is the caller graph for this function:

◆ getGotoLink()

ilSoapStructureObject::getGotoLink ( )

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

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

Referenced by exportXML().

91  : string
92  {
93  return ILIAS_HTTP_PATH . "/" . "goto.php?target=" . $this->getType() .
94  "_" . $this->getObjId() .
95  (is_numeric($this->getParentRefId()) ? "_" . $this->getParentRefId() : "") . "&client_id=" . CLIENT_ID;
96  }
const CLIENT_ID
Definition: constants.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInternalLink()

ilSoapStructureObject::getInternalLink ( )

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

Referenced by exportXML().

98  : string
99  {
100  return '';
101  }
+ Here is the caller graph for this function:

◆ getObjId()

◆ getParentRefId()

ilSoapStructureObject::getParentRefId ( )

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

References $parentRefId.

Referenced by getGotoLink().

124  : ?int
125  {
126  return $this->parentRefId;
127  }
+ Here is the caller graph for this function:

◆ getStructureObjects()

ilSoapStructureObject::getStructureObjects ( )

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

References $structureObjects.

Referenced by exportXML().

46  : array
47  {
49  }
+ Here is the caller graph for this function:

◆ getTitle()

ilSoapStructureObject::getTitle ( )

◆ getType()

ilSoapStructureObject::getType ( )

◆ setDescription()

ilSoapStructureObject::setDescription ( string  $value)

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

Referenced by __construct().

71  : void
72  {
73  $this->description = $value;
74  }
+ Here is the caller graph for this function:

◆ setObjId()

ilSoapStructureObject::setObjId ( int  $value)

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

Referenced by __construct().

51  : void
52  {
53  $this->obj_id = $value;
54  }
+ Here is the caller graph for this function:

◆ setParentRefId()

ilSoapStructureObject::setParentRefId ( int  $parentRefId)

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

References $parentRefId.

119  : void
120  {
121  $this->parentRefId = $parentRefId;
122  }

◆ setTitle()

ilSoapStructureObject::setTitle ( string  $value)

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

Referenced by __construct().

61  : void
62  {
63  $this->title = $value;
64  }
+ Here is the caller graph for this function:

◆ setType()

ilSoapStructureObject::setType ( string  $value)

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

Referenced by __construct().

81  : void
82  {
83  $this->type = $value;
84  }
+ Here is the caller graph for this function:

Field Documentation

◆ $description

string ilSoapStructureObject::$description

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

Referenced by getDescription().

◆ $obj_id

int ilSoapStructureObject::$obj_id

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

Referenced by getObjId().

◆ $parentRefId

int ilSoapStructureObject::$parentRefId

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

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

◆ $structureObjects

array ilSoapStructureObject::$structureObjects = array()

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

Referenced by getStructureObjects().

◆ $title

string ilSoapStructureObject::$title

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

Referenced by getTitle().

◆ $type

string ilSoapStructureObject::$type

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

Referenced by getType().


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