5 include_once 
"./Services/Xml/classes/class.ilXmlWriter.php";
    41         $ilUser = $DIC[
'ilUser'];
    44         $this->user_id = $ilUser->getId();
    47     public function setMode(
int $a_mode): void
    49         $this->mode = $a_mode;
    59         $this->highlighter = $a_highlighter;
    69         $this->check_permission = $a_status;
    79         $this->user_id = $a_id;
    89         $this->enable_operations = $a_status;
    99         $this->enable_references = $a_stat;
   121         $ilAccess = $DIC[
'ilAccess'];
   122         $objDefinition = $DIC[
'objDefinition'];
   126             if (method_exists($object, 
'getType') &&
   128                 $objDefinition->isRBACObject($object->getType()) &&
   129                 !$ilAccess->checkAccessOfUser(
   137             $this->appendObject($object);
   148     private function appendObject(
ilObject $object): 
void   152         $tree = $DIC[
'tree'];
   153         $rbacreview = $DIC[
'rbacreview'];
   156         $objectDefinition = $DIC[
'objDefinition'];
   159         if ($object->
getType() === 
"role" && $rbacreview->isRoleDeleted(
$id)) {
   168         if ($objectDefinition->supportsOfflineHandling($object->
getType())) {
   189             if (!$tree->isInTree($ref_id)) {
   195                 'parent_id' => $tree->getParentId($ref_id)
   197             $attr[
'accessInfo'] = $this->
getAccessInfo($object, $ref_id);
   216         $tree = $DIC[
'tree'];
   218         if (!$tree->checkForParentType($a_ref_id, 
'crs')) {
   221         include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
   224         switch ($time_targets[
'timing_type']) {
   226                 $type = self::TIMING_TEMPORARILY_AVAILABLE;
   229                 $type = self::TIMING_PRESETTING;
   233                 $type = self::TIMING_DEACTIVATED;
   237         $this->
xmlStartTag(
'TimeTarget', array(
'type' => $type));
   239         $vis = (
int) $time_targets[
'visible'] === 0 ? self::TIMING_VISIBILITY_OFF : self::TIMING_VISIBILITY_ON;
   242             array(
'starting_time' => $time_targets[
'timing_start'],
   243                   'ending_time' => $time_targets[
'timing_end'],
   251                 'starting_time' => $time_targets[
'suggestion_start'],
   252                 'ending_time' => $time_targets[
'suggestion_end'],
   253                 'changeable' => $time_targets[
'changeable']
   266                 $size = $obj->getFileSize();
   267                 $extension = $obj->getFileExtension();
   269                 $this->
xmlElement(
"Property", array(
'name' => 
'fileSize'), (
string) $size);
   270                 $this->
xmlElement(
"Property", array(
'name' => 
'fileExtension'), (
string) $extension);
   273                     array(
'name' => 
'fileVersion'),
   274                     (
string) $obj->getVersion()
   285         $ilAccess = $DIC[
'ilAccess'];
   286         $rbacreview = $DIC[
'rbacreview'];
   287         $objDefinition = $DIC[
'objDefinition'];
   290             $ops = $rbacreview->getOperationsOnTypeString($a_type);
   291             if (is_array($ops)) {
   292                 foreach ($ops as $ops_id) {
   293                     $operation = $rbacreview->getOperation($ops_id);
   295                     if (count($operation) && $ilAccess->checkAccessOfUser(
   297                         $operation[
'operation'],
   301                         $this->
xmlElement(
'Operation', null, $operation[
'operation']);
   306             $objects = $objDefinition->getCreatableSubObjects($a_type);
   308             $creation_operations = array();
   309             foreach ($objects as $type => $info) {
   310                 $ops_id = $ops_ids[$type] ?? null;
   316                 $operation = $rbacreview->getOperation($ops_id);
   318                 if (count($operation) && $ilAccess->checkAccessOfUser(
   320                     $operation[
'operation'],
   324                     $this->
xmlElement(
'Operation', null, $operation[
'operation']);
   332         self::appendPathToObject($this, $refid);
   337         $this->
xmlSetDtdDef(
"<!DOCTYPE Objects PUBLIC \"-//ILIAS//DTD ILIAS Repositoryobjects//EN\" \"" . ILIAS_HTTP_PATH . 
"/xml/ilias_object_4_0.dtd\">");
   352         $ilAccess = $DIC[
'ilAccess'];
   354         include_once 
'Services/AccessControl/classes/class.ilAccess.php';
   356         $ilAccess->checkAccessOfUser($this->
getUserId(), 
'read', 
'view', $ref_id, $object->
getType(), $object->
getId());
   358         if (!$info = $ilAccess->getInfo()) {
   362         return $info[0][
'type'];
   369         $tree = $DIC[
'tree'];
   371         $items = $tree->getPathFull($refid);
   373         foreach ($items as $item) {
   374             if ((
int) $item[
"ref_id"] === $refid) {
   377             if ($item[
"type"] === 
"root") {
   378                 $item[
"title"] = 
$lng->txt(
"repository");
   380             $writer->
xmlElement(
"Element", array(
"ref_id" => $item[
"ref_id"], 
"type" => $item[
"type"]), $item[
"title"]);
 
enableOperations(bool $a_status)
 
isPermissionCheckEnabled()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setHighlighter(ilLuceneHighlighterResultParser $a_highlighter)
 
const TIMING_VISIBILITY_OFF
 
static _getAllReferences(int $id)
get all reference ids for object ID 
 
const TIMINGS_DEACTIVATED
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
xmlSetGenCmt(string $genCmt)
Sets generated comment. 
 
getCreateDate()
Get create date in YYYY-MM-DD HH-MM-SS format. 
 
getAccessInfo(ilObject $object, int $ref_id)
 
xmlEndTag(string $tag)
Writes an endtag. 
 
static lookupCreateOperationIds(array $a_type_arr)
Lookup operation ids. 
 
xmlSetDtdDef(string $dtdDef)
Sets dtd definition. 
 
const TIMING_TEMPORARILY_AVAILABLE
 
ilLuceneHighlighterResultParser $highlighter
 
appendOperations(int $a_ref_id, string $a_type)
 
xmlHeader()
Writes xml header. 
 
const TIMING_VISIBILITY_ON
 
setObjects(array $objects)
 
static getItem(int $ref_id)
 
enablePermissionCheck(bool $a_status)
 
appendTimeTargets(int $a_ref_id)
Append time target settings for items inside of courses. 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag. 
 
appendObjectProperties(ilObject $obj)
 
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content) 
 
getLastUpdateDate()
Get last update date in YYYY-MM-DD HH-MM-SS format. 
 
xmlDumpMem(bool $format=true)
Returns xml document from memory. 
 
static appendPathToObject(ilXmlWriter $writer, int $refid)
 
enableReferences(bool $a_stat)
 
XML writer class Class to simplify manual writing of xml documents.