5include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
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)
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']) {
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();
310 $ops_id = $ops_ids[
$type];
316 $operation = $rbacreview->getOperation($ops_id);
318 if (count($operation) && $ilAccess->checkAccessOfUser(
320 $operation[
'operation'],
324 $this->
xmlElement(
'Operation',
null, $operation[
'operation']);
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"]);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const TIMINGS_DEACTIVATED
static getItem(int $ref_id)
XML writer class Class to simplify manual writing of xml documents.
setHighlighter(ilLuceneHighlighterResultParser $a_highlighter)
const TIMING_TEMPORARILY_AVAILABLE
ilLuceneHighlighterResultParser $highlighter
const TIMING_VISIBILITY_ON
enablePermissionCheck(bool $a_status)
static appendPathToObject(ilXmlWriter $writer, int $refid)
appendTimeTargets(int $a_ref_id)
Append time target settings for items inside of courses.
enableOperations(bool $a_status)
getAccessInfo(ilObject $object, int $ref_id)
const TIMING_VISIBILITY_OFF
appendObjectProperties(ilObject $obj)
appendOperations(int $a_ref_id, string $a_type)
enableReferences(bool $a_stat)
isPermissionCheckEnabled()
setObjects(array $objects)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAllReferences(int $id)
get all reference ids for object ID
getLastUpdateDate()
Get last update date in YYYY-MM-DD HH-MM-SS format.
getCreateDate()
Get create date in YYYY-MM-DD HH-MM-SS format.
static lookupCreateOperationIds(array $a_type_arr)
Lookup operation ids.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlSetGenCmt(string $genCmt)
Sets generated comment.
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlHeader()
Writes xml header.
xmlEndTag(string $tag)
Writes an endtag.
xmlSetDtdDef(string $dtdDef)
Sets dtd definition.
xmlDumpMem(bool $format=true)
Returns xml document from memory.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc