19declare(strict_types=1);
32 $this->tree =
$DIC->repositoryTree();
33 $this->
access = $DIC->access();
43 $short_desc = $this->
settings->get(
'rep_shorten_description');
44 $short_desc_max_length = (
int) $this->
settings->get(
'rep_shorten_description_length');
46 if (!is_array($objTypes) || $objTypes === []) {
47 $objTypes = $this->
repository->getValidObjectTypes();
51 foreach ($this->
repository->getForUser($this->actor, $objTypes, $this->actor->getLanguage()) as $item) {
52 $refId = $item->getRefId();
53 $objId = $item->getObjId();
54 $parentRefId = $item->getParentRefId();
55 $title = $item->getTitle();
56 $parentTreeLftValue = $item->getParentLftTree();
57 $parentTreeLftValue = sprintf(
'%010d', $parentTreeLftValue);
59 if (!$this->
access->checkAccess(
'visible',
'',
$refId)) {
63 $periodStart = $periodEnd =
null;
64 if ($item->getPeriodStart() !==
null && $item->getPeriodEnd() !==
null) {
65 if ($item->objectPeriodHasTime()) {
74 $description = $item->getDescription();
75 if ($short_desc && $short_desc_max_length !== 0) {
79 $references[$parentTreeLftValue . $title .
$refId] = [
82 'type' => $item->getType(),
84 'description' => $description,
85 'parent_ref' => $parentRefId,
86 'start' => $periodStart,
94 public function getItems(array $object_type_white_list = []): array
@classDescription Date and time handling
readonly ilAccessHandler $access
getObjectsByMembership(array $objTypes=[])
getItems(array $object_type_white_list=[])
readonly ilPDSelectedItemsBlockMembershipsObjectRepository $repository
__construct(protected readonly ilObjUser $actor)
readonly ilSetting $settings
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...