ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
)

Definition at line 38 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 120 of file class.ilSoapStructureObject.php.

Referenced by exportXML().

120  : string
121  {
122  return "StructureObject";
123  }
+ Here is the caller graph for this function:

◆ _getXMLAttributes()

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

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

References getObjId(), and getType().

Referenced by exportXML().

112  : array
113  {
114  return array(
115  'type' => $this->getType(),
116  'obj_id' => $this->getObjId()
117  );
118  }
+ 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.

References getObjId().

47  : void
48  {
49  $this->structureObjects [$structureObject->getObjId()] = $structureObject;
50  }
+ Here is the call graph for this function:

◆ exportXML()

ilSoapStructureObject::exportXML ( ilXmlWriter  $xml_writer)

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

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

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  }
xmlEndTag(string $tag)
Writes an endtag.
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 82 of file class.ilSoapStructureObject.php.

References $description.

Referenced by exportXML().

82  : string
83  {
84  return $this->description;
85  }
+ Here is the caller graph for this function:

◆ getGotoLink()

ilSoapStructureObject::getGotoLink ( )

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

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

Referenced by exportXML().

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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInternalLink()

ilSoapStructureObject::getInternalLink ( )

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

Referenced by exportXML().

104  : string
105  {
106  return '';
107  }
+ Here is the caller graph for this function:

◆ getObjId()

◆ getParentRefId()

ilSoapStructureObject::getParentRefId ( )

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

References $parentRefId.

Referenced by getGotoLink().

130  : ?int
131  {
132  return $this->parentRefId;
133  }
+ Here is the caller graph for this function:

◆ getStructureObjects()

ilSoapStructureObject::getStructureObjects ( )

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

References $structureObjects.

Referenced by exportXML().

52  : array
53  {
55  }
+ 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.

Referenced by __construct().

77  : void
78  {
79  $this->description = $value;
80  }
+ Here is the caller graph for this function:

◆ setObjId()

ilSoapStructureObject::setObjId ( int  $value)

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

Referenced by __construct().

57  : void
58  {
59  $this->obj_id = $value;
60  }
+ Here is the caller graph for this function:

◆ setParentRefId()

ilSoapStructureObject::setParentRefId ( int  $parentRefId)

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

References $parentRefId.

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

◆ setTitle()

ilSoapStructureObject::setTitle ( string  $value)

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

Referenced by __construct().

67  : void
68  {
69  $this->title = $value;
70  }
+ Here is the caller graph for this function:

◆ setType()

ilSoapStructureObject::setType ( string  $value)

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

Referenced by __construct().

87  : void
88  {
89  $this->type = $value;
90  }
+ Here is the caller graph for this function:

Field Documentation

◆ $description

string ilSoapStructureObject::$description

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

Referenced by getDescription().

◆ $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 getStructureObjects().

◆ $title

string ilSoapStructureObject::$title

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

Referenced by getTitle().

◆ $type

string ilSoapStructureObject::$type

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

Referenced by getType().


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