53 $ilUser =
$DIC[
'ilUser'];
56 $this->user_id = $ilUser->getId();
59 public function setMode(
int $a_mode): void
61 $this->mode = $a_mode;
71 $this->highlighter = $a_highlighter;
81 $this->check_permission = $a_status;
91 $this->user_id = $a_id;
101 $this->enable_operations = $a_status;
111 $this->enable_references = $a_stat;
133 $ilAccess =
$DIC[
'ilAccess'];
134 $objDefinition =
$DIC[
'objDefinition'];
138 if (method_exists($object,
'getType') &&
140 $objDefinition->isRBACObject($object->getType()) &&
141 !$ilAccess->checkAccessOfUser(
149 $this->appendObject($object);
160 private function appendObject(
ilObject $object): void
164 $tree =
$DIC[
'tree'];
165 $rbacreview =
$DIC[
'rbacreview'];
168 $objectDefinition =
$DIC[
'objDefinition'];
171 if ($object->
getType() ===
"role" && $rbacreview->isRoleDeleted(
$id)) {
180 if ($objectDefinition->supportsOfflineHandling($object->
getType())) {
201 if (!$tree->isInTree(
$ref_id)) {
207 'parent_id' => $tree->getParentId(
$ref_id)
228 $tree =
$DIC[
'tree'];
230 if (!$tree->checkForParentType($a_ref_id,
'crs')) {
235 switch ($time_targets[
'timing_type']) {
248 $this->
xmlStartTag(
'TimeTarget', array(
'type' => $type));
250 $vis = (
int) $time_targets[
'visible'] === 0 ? self::TIMING_VISIBILITY_OFF : self::TIMING_VISIBILITY_ON;
253 array(
'starting_time' => $time_targets[
'timing_start'],
254 'ending_time' => $time_targets[
'timing_end'],
262 'starting_time' => $time_targets[
'suggestion_start'],
263 'ending_time' => $time_targets[
'suggestion_end'],
264 'changeable' => $time_targets[
'changeable']
277 $size = $obj->getFileSize();
278 $extension = $obj->getFileExtension();
280 $this->
xmlElement(
"Property", array(
'name' =>
'fileSize'), (
string) $size);
281 $this->
xmlElement(
"Property", array(
'name' =>
'fileExtension'), (
string) $extension);
284 array(
'name' =>
'fileVersion'),
285 (
string) $obj->getVersion()
296 $ilAccess =
$DIC[
'ilAccess'];
297 $rbacreview =
$DIC[
'rbacreview'];
298 $objDefinition =
$DIC[
'objDefinition'];
301 $ops = $rbacreview->getOperationsOnTypeString($a_type);
302 if (is_array($ops)) {
303 foreach ($ops as $ops_id) {
304 $operation = $rbacreview->getOperation($ops_id);
306 if (count($operation) && $ilAccess->checkAccessOfUser(
308 $operation[
'operation'],
312 $this->
xmlElement(
'Operation',
null, $operation[
'operation']);
317 $objects = $objDefinition->getCreatableSubObjects($a_type);
319 $creation_operations = array();
321 $ops_id = $ops_ids[$type] ??
null;
327 $operation = $rbacreview->getOperation($ops_id);
329 if (count($operation) && $ilAccess->checkAccessOfUser(
331 $operation[
'operation'],
335 $this->
xmlElement(
'Operation',
null, $operation[
'operation']);
348 $this->
xmlSetDtdDef(
"<!DOCTYPE Objects PUBLIC \"-//ILIAS//DTD ILIAS Repositoryobjects//EN\" \"" . ILIAS_HTTP_PATH .
"/components/ILIAS/Export/xml/ilias_object_4_0.dtd\">");
363 $ilAccess =
$DIC[
'ilAccess'];
365 $ilAccess->checkAccessOfUser($this->
getUserId(),
'read',
'view', $ref_id, $object->
getType(), $object->
getId());
367 if (!
$info = $ilAccess->getInfo()) {
371 return $info[0][
'type'];
378 $tree =
$DIC[
'tree'];
380 $items = $tree->getPathFull($refid);
382 foreach ($items as $item) {
383 if ((
int) $item[
"ref_id"] === $refid) {
386 if ($item[
"type"] ===
"root") {
387 $item[
"title"] =
$lng->txt(
"repository");
389 $writer->
xmlElement(
"Element", array(
"ref_id" => $item[
"ref_id"],
"type" => $item[
"type"]), $item[
"title"]);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Parses result XML from lucene search highlight.
const TIMINGS_DEACTIVATED
static getItem(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
Class ilObject Basic functions for all objects.
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