ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Notes\DomainService Class Reference

Domain facade. More...

+ Collaboration diagram for ILIAS\Notes\DomainService:

Public Member Functions

 __construct (InternalDomainService $internal_domain)
 
 getNrOfNotesForContext (Context $context, bool $incl_sub=false, ?int $author=null)
 
 getNrOfCommentsForContext (Context $context, bool $incl_sub=false)
 
 getById (int $id)
 Get note by id. More...
 
 getAllCommentsForObjId (int $obj_id, string $since="")
 Gets all comments of a repo object, incl. More...
 
 commentsActive (int $obj_id)
 Are comments activated for object? More...
 
 activateComments (int $obj_id, bool $a_activate=true)
 
 getUserCount (int $obj_id, int $sub_obj_id, string $obj_type)
 How many users have attached a note/comment to a given object? More...
 

Protected Attributes

NotesManager $notes_manager
 
InternalDomainService $internal_domain
 

Detailed Description

Domain facade.

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

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Notes\DomainService::__construct ( InternalDomainService  $internal_domain)

Definition at line 32 of file class.DomainService.php.

References ILIAS\Notes\DomainService\$internal_domain, and ILIAS\Notes\InternalDomainService\notes().

34  {
35  $this->internal_domain = $internal_domain;
36  $this->notes_manager = $internal_domain->notes();
37  }
InternalDomainService $internal_domain
+ Here is the call graph for this function:

Member Function Documentation

◆ activateComments()

ILIAS\Notes\DomainService::activateComments ( int  $obj_id,
bool  $a_activate = true 
)

Definition at line 103 of file class.DomainService.php.

106  : void {
107  $this->notes_manager->activateComments($obj_id, $a_activate);
108  }

◆ commentsActive()

ILIAS\Notes\DomainService::commentsActive ( int  $obj_id)

Are comments activated for object?

Definition at line 97 of file class.DomainService.php.

99  : bool {
100  return $this->notes_manager->commentsActive($obj_id);
101  }

◆ getAllCommentsForObjId()

ILIAS\Notes\DomainService::getAllCommentsForObjId ( int  $obj_id,
string  $since = "" 
)

Gets all comments of a repo object, incl.

comments of subobjects.

Returns
Note[]

Definition at line 80 of file class.DomainService.php.

References ILIAS\Notes\Note\PUBLIC.

83  : array {
84  return $this->notes_manager->getNotesForRepositoryObjId(
85  $obj_id,
87  false,
88  0,
89  false,
90  $since
91  );
92  }

◆ getById()

ILIAS\Notes\DomainService::getById ( int  $id)

Get note by id.

Definition at line 69 of file class.DomainService.php.

71  : Note {
72  return $this->notes_manager->getById($id);
73  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ getNrOfCommentsForContext()

ILIAS\Notes\DomainService::getNrOfCommentsForContext ( Context  $context,
bool  $incl_sub = false 
)

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

References ILIAS\Notes\Note\PUBLIC.

58  : int {
59  return $this->notes_manager->getNrOfNotesForContext(
60  $context,
62  $incl_sub
63  );
64  }
$context
Definition: webdav.php:31

◆ getNrOfNotesForContext()

ILIAS\Notes\DomainService::getNrOfNotesForContext ( Context  $context,
bool  $incl_sub = false,
?int  $author = null 
)

Definition at line 39 of file class.DomainService.php.

References ILIAS\Notes\Note\PRIVATE.

43  : int {
44  if (is_null($author)) {
45  $author = $this->internal_domain->user()->getId();
46  }
47  return $this->notes_manager->getNrOfNotesForContext(
48  $context,
50  $incl_sub,
51  $author
52  );
53  }
$context
Definition: webdav.php:31

◆ getUserCount()

ILIAS\Notes\DomainService::getUserCount ( int  $obj_id,
int  $sub_obj_id,
string  $obj_type 
)

How many users have attached a note/comment to a given object?

Definition at line 113 of file class.DomainService.php.

117  : int {
118  return $this->notes_manager->getUserCount($obj_id, $sub_obj_id, $obj_type);
119  }

Field Documentation

◆ $internal_domain

InternalDomainService ILIAS\Notes\DomainService::$internal_domain
protected

Definition at line 30 of file class.DomainService.php.

Referenced by ILIAS\Notes\DomainService\__construct().

◆ $notes_manager

NotesManager ILIAS\Notes\DomainService::$notes_manager
protected

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


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