19declare(strict_types=1);
42 $objTypes = array_intersect($objTypes, self::VALID_OBJECT_TYPES);
43 if ($objTypes === []) {
47 $odObjTypes =
' AND ' . $this->db->in(
54 $res = $this->db->queryF(
61 WHEN (trans.title IS NOT NULL AND trans.title != '')
68 WHEN (trans.description IS NOT NULL AND trans.description != '')
69 THEN trans.description
78 WHEN od.type = 'crs' THEN crs_settings.period_start
79 ELSE grp_settings.period_start
84 WHEN od.type = 'crs' THEN crs_settings.period_end
85 ELSE grp_settings.period_end
90 WHEN od.type = 'crs' THEN crs_settings.period_time_indication
91 ELSE grp_settings.period_time_indication
95 INNER JOIN rbac_fa fa ON fa.rol_id = ua.rol_id AND fa.assign = %s
96 INNER JOIN object_reference objr ON objr.ref_id = fa.parent
97 INNER JOIN object_data od ON od.obj_id = objr.obj_id $odObjTypes
98 INNER JOIN tree t ON t.child = objr.ref_id AND t.tree = %s AND t.parent != %s
99 INNER JOIN tree tp ON tp.child = t.parent
100 LEFT JOIN grp_settings ON grp_settings.obj_id = od.obj_id
101 LEFT JOIN crs_settings ON crs_settings.obj_id = od.obj_id
102 LEFT JOIN object_translation trans ON trans.obj_id = od.obj_id AND trans.lang_code = %s
106 [
'y', 1, $this->recovery_folder_id, $actorLanguageCode, $user->
getId()]
109 while ($row = $this->db->fetchAssoc(
$res)) {
111 if (!is_null($row[
'period_start'])) {
112 $periodStart =
new DateTimeImmutable($row[
'period_start'],
new DateTimeZone(
'UTC'));
115 if (!is_null($row[
'period_end'])) {
116 $periodEnd =
new DateTimeImmutable($row[
'period_end'],
new DateTimeZone(
'UTC'));
120 (
int) $row[
'ref_id'],
121 (
int) $row[
'obj_id'],
122 (
string) $row[
'type'],
123 (
string) $row[
'title'],
124 (
string) $row[
'description'],
125 (
int) $row[
'parent'],
126 (
int) $row[
'parent_lft'],
127 (
bool) $row[
'period_has_time'],
getForUser(ilObjUser $user, array $objTypes, string $actorLanguageCode)
__construct(protected readonly ilDBInterface $db, protected readonly int $recovery_folder_id)