ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.UserImageExporter.php
Go to the documentation of this file.
1<?php
2
19namespace ILIAS\Notes\Export;
20
26{
27 protected \ilDBInterface $db;
28
29 public function __construct()
30 {
31 global $DIC;
32
33 $this->db = $DIC->database();
34 }
35
37 string $export_dir,
38 int $rep_obj_id
39 ): void {
40 $db = $this->db;
41 $set = $db->queryF(
42 "SELECT DISTINCT author FROM note " .
43 " WHERE rep_obj_id = %s " .
44 " AND type = %s ",
45 ["integer", "integer"],
46 [$rep_obj_id, 2]
47 );
48 $user_ids = [];
49 while ($rec = $db->fetchAssoc($set)) {
50 $user_ids[] = (int) $rec["author"];
51 }
52 $this->exportUserImages($export_dir, $user_ids);
53 }
54
55 public function exportUserImages(string $export_dir, array $user_ids): void
56 {
57 $user_export = new \ILIAS\User\Export\UserHtmlExport();
58 $user_export->exportUserImages($export_dir, $user_ids);
59 }
60}
Helper UI class for notes/comments handling in (HTML) exports.
exportUserImagesForRepObjId(string $export_dir, int $rep_obj_id)
exportUserImages(string $export_dir, array $user_ids)
fetchAssoc(ilDBStatement $statement)
queryF(string $query, array $types, array $values)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26