ILIAS  release_7 Revision v7.30-3-g800a261c036
class.UserImageExporter.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\Notes\Export;
6
12{
13
17 protected $db;
18
22 public function __construct()
23 {
24 global $DIC;
25
26 $this->db = $DIC->database();
27 }
28
35 public function exportUserImagesForRepObjId($export_dir, $rep_obj_id)
36 {
37 $db = $this->db;
38 $set = $db->queryF(
39 "SELECT DISTINCT author FROM note " .
40 " WHERE rep_obj_id = %s " .
41 " AND type = %s ",
42 ["integer", "integer"],
43 [$rep_obj_id, 2]
44 );
45 $user_ids = [];
46 while ($rec = $db->fetchAssoc($set)) {
47 $user_ids[] = $rec["author"];
48 }
49 $user_export = new \ILIAS\User\Export\UserHtmlExport();
50 $user_export->exportUserImages($export_dir, $user_ids);
51 }
52}
An exception for terminatinating execution or to throw for unit testing.
Helper UI class for notes/comments handling in (HTML) exports.
exportUserImagesForRepObjId($export_dir, $rep_obj_id)
global $DIC
Definition: goto.php:24