ILIAS  release_8 Revision v8.24
class.DomainService.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21namespace ILIAS\Notes;
22
28{
31
32 public function __construct(
34 ) {
35 $this->internal_domain = $internal_domain;
36 $this->notes_manager = $internal_domain->notes();
37 }
38
39 public function getNrOfNotesForContext(
41 bool $incl_sub = false,
42 ?int $author = null
43 ): int {
44 if (is_null($author)) {
45 $author = $this->internal_domain->user()->getId();
46 }
47 return $this->notes_manager->getNrOfNotesForContext(
50 $incl_sub,
51 $author
52 );
53 }
54
57 bool $incl_sub = false
58 ): int {
59 return $this->notes_manager->getNrOfNotesForContext(
61 Note::PUBLIC,
62 $incl_sub
63 );
64 }
65
69 public function getById(
70 int $id
71 ): Note {
72 return $this->notes_manager->getById($id);
73 }
74
80 public function getAllCommentsForObjId(
81 int $obj_id,
82 string $since = ""
83 ): array {
84 return $this->notes_manager->getNotesForRepositoryObjId(
85 $obj_id,
86 Note::PUBLIC,
87 false,
88 0,
89 false,
90 $since
91 );
92 }
93
97 public function commentsActive(
98 int $obj_id
99 ): bool {
100 return $this->notes_manager->commentsActive($obj_id);
101 }
102
103 public function activateComments(
104 int $obj_id,
105 bool $a_activate = true
106 ): void {
107 $this->notes_manager->activateComments($obj_id, $a_activate);
108 }
109
113 public function getUserCount(
114 int $obj_id,
115 int $sub_obj_id,
116 string $obj_type
117 ): int {
118 return $this->notes_manager->getUserCount($obj_id, $sub_obj_id, $obj_type);
119 }
120}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
commentsActive(int $obj_id)
Are comments activated for object?
getUserCount(int $obj_id, int $sub_obj_id, string $obj_type)
How many users have attached a note/comment to a given object?
getNrOfCommentsForContext(Context $context, bool $incl_sub=false)
getAllCommentsForObjId(int $obj_id, string $since="")
Gets all comments of a repo object, incl.
getNrOfNotesForContext(Context $context, bool $incl_sub=false, ?int $author=null)
activateComments(int $obj_id, bool $a_activate=true)
InternalDomainService $internal_domain
__construct(InternalDomainService $internal_domain)
getById(int $id)
Get note by id.
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$context
Definition: webdav.php:29