Gets all objects the current user is member of.
57 : array
58 {
59 $short_desc = $this->
settings->get(
"rep_shorten_description");
60 $short_desc_max_length = $this->
settings->get(
"rep_shorten_description_length");
61
62 if (!is_array($objTypes) || $objTypes === []) {
63 $objTypes = $this->
repository->getValidObjectTypes();
64 }
65
66 $references = [];
67 foreach ($this->
repository->getForUser($this->actor, $objTypes, $this->actor->getLanguage()) as $item) {
68 $refId = $item->getRefId();
69 $objId = $item->getObjId();
70 $parentRefId = $item->getParentRefId();
71 $title = $item->getTitle();
72 $parentTreeLftValue = $item->getParentLftTree();
73 $parentTreeLftValue = sprintf("%010d", $parentTreeLftValue);
74
75 if (!$this->access->checkAccess(
'visible',
'',
$refId)) {
76 continue;
77 }
78
79 $periodStart = $periodEnd = null;
80 if ($item->getPeriodStart() !== null && $item->getPeriodEnd() !== null) {
81 if ($item->objectPeriodHasTime()) {
84 } else {
87 }
88 }
89
90 $description = $item->getDescription();
91 if ($short_desc && $short_desc_max_length) {
93 }
94
95 $references[$parentTreeLftValue . $title .
$refId] = [
98 'type' => $item->getType(),
99 'title' => $title,
100 'description' => $description,
101 'parent_ref' => $parentRefId,
102 'start' => $periodStart,
103 'end' => $periodEnd
104 ];
105 }
106 ksort($references);
107
108 return $references;
109 }
@classDescription Date and time handling
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.