ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Notes\Export\UserImageExporter Class Reference

Helper UI class for notes/comments handling in (HTML) exports. More...

+ Collaboration diagram for ILIAS\Notes\Export\UserImageExporter:

Public Member Functions

 __construct ()
 
 exportUserImagesForRepObjId (string $export_dir, int $rep_obj_id)
 
 exportUserImages (string $export_dir, array $user_ids)
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Helper UI class for notes/comments handling in (HTML) exports.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.UserImageExporter.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Notes\Export\UserImageExporter::__construct ( )

Definition at line 29 of file class.UserImageExporter.php.

30 {
31 global $DIC;
32
33 $this->db = $DIC->database();
34 }
global $DIC
Definition: shib_login.php:26

References $DIC.

Member Function Documentation

◆ exportUserImages()

ILIAS\Notes\Export\UserImageExporter::exportUserImages ( string  $export_dir,
array  $user_ids 
)

Definition at line 55 of file class.UserImageExporter.php.

55 : void
56 {
57 $user_export = new \ILIAS\User\Export\UserHtmlExport();
58 $user_export->exportUserImages($export_dir, $user_ids);
59 }

◆ exportUserImagesForRepObjId()

ILIAS\Notes\Export\UserImageExporter::exportUserImagesForRepObjId ( string  $export_dir,
int  $rep_obj_id 
)

Definition at line 36 of file class.UserImageExporter.php.

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 }
exportUserImages(string $export_dir, array $user_ids)
fetchAssoc(ilDBStatement $statement)
queryF(string $query, array $types, array $values)

References ILIAS\Repository\int().

+ Here is the call graph for this function:

Field Documentation

◆ $db

ilDBInterface ILIAS\Notes\Export\UserImageExporter::$db
protected

Definition at line 27 of file class.UserImageExporter.php.


The documentation for this class was generated from the following file: