41 : array
42 {
43 $short_desc = $this->
settings->get(
'rep_shorten_description');
44 $short_desc_max_length = (
int) $this->
settings->get(
'rep_shorten_description_length');
45
46 if (!is_array($objTypes) || $objTypes === []) {
47 $objTypes = $this->
repository->getValidObjectTypes();
48 }
49
50 $references = [];
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);
58
59 if (!$this->
access->checkAccess(
'visible',
'',
$refId)) {
60 continue;
61 }
62
63 $periodStart = $periodEnd = null;
64 if ($item->getPeriodStart() !== null && $item->getPeriodEnd() !== null) {
65 if ($item->objectPeriodHasTime()) {
68 } else {
71 }
72 }
73
74 $description = $item->getDescription();
75 if ($short_desc && $short_desc_max_length !== 0) {
77 }
78
79 $references[$parentTreeLftValue . $title .
$refId] = [
82 'type' => $item->getType(),
83 'title' => $title,
84 'description' => $description,
85 'parent_ref' => $parentRefId,
86 'start' => $periodStart,
87 'end' => $periodEnd
88 ];
89 }
90
91 return $references;
92 }
@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)