19declare(strict_types=1);
34 $this->tree =
$DIC->repositoryTree();
35 $this->
access = $DIC->access();
45 $short_desc = $this->
settings->get(
'rep_shorten_description');
46 $short_desc_max_length = (
int) $this->
settings->get(
'rep_shorten_description_length');
48 if (!is_array($objTypes) || $objTypes === []) {
49 $objTypes = $this->
repository->getValidObjectTypes();
53 foreach ($this->
repository->getForUser($this->actor, $objTypes, $this->actor->getLanguage()) as $item) {
54 $refId = $item->getRefId();
55 $objId = $item->getObjId();
56 $parentRefId = $item->getParentRefId();
57 $title = $item->getTitle();
58 $parentTreeLftValue = $item->getParentLftTree();
59 $parentTreeLftValue = sprintf(
'%010d', $parentTreeLftValue);
61 if (!$this->
access->checkAccess(
'visible',
'',
$refId)) {
65 $periodStart = $periodEnd =
null;
66 if ($item->getPeriodStart() !==
null && $item->getPeriodEnd() !==
null) {
67 if ($item->objectPeriodHasTime()) {
76 $description = $item->getDescription();
77 if ($short_desc && $short_desc_max_length !== 0) {
81 $references[$parentTreeLftValue . $title .
$refId] = [
84 'type' => $item->getType(),
86 'description' => $description,
87 'parent_ref' => $parentRefId,
88 'start' => $periodStart,
97 public function getItems(array $object_type_white_list = []): array
@classDescription Date and time handling
__construct(ilObjUser $actor)
ilPDSelectedItemsBlockMembershipsObjectRepository $repository
getObjectsByMembership(array $objTypes=[])
getItems(array $object_type_white_list=[])
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...