43 : array
44 {
45 $short_desc = $this->
settings->get(
'rep_shorten_description');
46 $short_desc_max_length = (
int) $this->
settings->get(
'rep_shorten_description_length');
47
48 if (!is_array($objTypes) || $objTypes === []) {
49 $objTypes = $this->
repository->getValidObjectTypes();
50 }
51
52 $references = [];
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);
60
61 if (!$this->
access->checkAccess(
'visible',
'',
$refId)) {
62 continue;
63 }
64
65 $periodStart = $periodEnd = null;
66 if ($item->getPeriodStart() !== null && $item->getPeriodEnd() !== null) {
67 if ($item->objectPeriodHasTime()) {
70 } else {
73 }
74 }
75
76 $description = $item->getDescription();
77 if ($short_desc && $short_desc_max_length !== 0) {
79 }
80
81 $references[$parentTreeLftValue . $title .
$refId] = [
84 'type' => $item->getType(),
85 'title' => $title,
86 'description' => $description,
87 'parent_ref' => $parentRefId,
88 'start' => $periodStart,
89 'end' => $periodEnd
90 ];
91 }
92 ksort($references);
93
94 return $references;
95 }
@classDescription Date and time handling
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)