ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMessageGUI Class Reference

Message GUI. More...

+ Inheritance diagram for ilMessageGUI:
+ Collaboration diagram for ilMessageGUI:

Public Member Functions

 __construct (int $recipient, $rep_obj_id=0, int $obj_id=0, string $obj_type="")
 
 getNotesHTML ()
 
 getCommentsHTML ()
 
 getHTML ()
 
 getListHTML (bool $a_init_form=true)
 
 setAnonymised (bool $anonymised, string $counterpart_name)
 
- Public Member Functions inherited from ilNoteGUI
 __construct ( $a_rep_obj_id=0, int $a_obj_id=0, string $a_obj_type="", bool $a_include_subobjects=false, int $a_news_id=0, bool $ajax=true, string $search_text="")
 
 setShowEmptyListMessage (bool $a_val)
 
 getShowEmptyListMessage ()
 
 setShowHeader (bool $a_val)
 
 getShowHeader ()
 
 setUseObjectTitleHeader (bool $a_val)
 
 getUseObjectTitleHeader ()
 
 setDefaultCommand (string $a_val)
 
 setHideNewForm (bool $a_val)
 
 getDefaultCommand ()
 
 executeCommand ()
 
 enablePrivateNotes (bool $a_enable=true)
 
 enablePublicNotes (bool $a_enable=true)
 
 enableCommentsSettings (bool $a_enable=true)
 
 enablePublicNotesDeletion (bool $a_enable=true)
 
 enableTargets (bool $a_enable=true)
 
 setRepositoryMode (bool $a_value)
 
 getNotesHTML ()
 
 getListHTML (bool $a_init_form=true)
 
 activateComments ()
 
 deactivateComments ()
 
 getNoteListHTML (bool $a_init_form=true)
 
 getTarget (Note $note)
 show related objects as links More...
 
 addNoteForm (bool $a_init_form=true)
 get notes list including add note area More...
 
 cancelAddNote ()
 cancel add note More...
 
 cancelUpdateNote ()
 cancel edit note More...
 
 addNote ()
 add note More...
 
 updateNote ()
 
 editNoteForm (bool $a_init_form=true)
 get notes list including add note area More...
 
 renderContent (string $content)
 Render content into notes wrapper. More...
 
 cancelDelete ()
 
 confirmDelete ()
 
 exportNotesHTML ()
 export selected notes to html More...
 
 getShyButton (string $a_var, string $a_txt, string $a_cmd, string $a_anchor="", int $note_id=0)
 
 getButton (string $a_var, string $a_txt, string $a_cmd, string $a_anchor="")
 
 addObserver (callable $a_callback)
 Add observer. More...
 
 setExportMode ()
 
 getGlyph ()
 
 getNumber ()
 
 getTriggerShyButton ()
 
 getWidget ()
 

Protected Member Functions

 getNoEntriesText (bool $search)
 
 getItemGroupTitle (int $obj_id=0)
 
 getItemTitle (Note $note)
 
 addItemProperties (Note $note, array &$properties)
 
 getFormLabelKey ()
 
 getDeleteText ()
 
 getListTitle ()
 
 getAddText ()
 
 getDeletedMultipleText ()
 
 getDeletedSingleText ()
 
 getLatestItemText ()
 
 getAddEditItemText ()
 
- Protected Member Functions inherited from ilNoteGUI
 renderComponents (array $components)
 
 getCommentsHTML ()
 
 getNotes ()
 
 getListTitle ()
 
 getAddText ()
 
 getDeletedMultipleText ()
 
 getDeletedSingleText ()
 
 getLatestItemText ()
 
 getAddEditItemText ()
 
 getNoEntriesText (bool $search)
 
 getSortationControl ()
 
 getItemGroupTitle (int $obj_id=0)
 
 getItemForNote (Note $note, bool $actions=true)
 
 getItemTitle (Note $note)
 
 addItemProperties (Note $note, array &$properties)
 
 getNoteTextPlaceholder (Note $note)
 
 getNoteText (Note $note)
 
 getSubObjectTitle (int $parent_obj_id, int $sub_obj_id)
 Get sub object title if available with callback. More...
 
 getNoteForm (string $mode, int $type, ?Note $note=null)
 
 getFormLabelKey ()
 
 deleteNote ()
 
 getDeleteText ()
 
 listSortAsc ()
 
 listSortDesc ()
 
 getOriginHeader ()
 
 updateWidget ()
 
 updateGlyph ()
 
 updateNumber ()
 

Protected Attributes

int $note_type = Note::MESSAGE
 
bool $anonymised = false
 
string $counterpart_name = ""
 
- Protected Attributes inherited from ilNoteGUI
array $notes = null
 
ILIAS Notes InternalGUIService $gui
 
string $search_text
 
ILIAS Notes AccessManager $notes_access
 
ILIAS Notes InternalDataService $data
 
ilWorkspaceAccessHandler $wsp_access_handler
 
ilWorkspaceTree $wsp_tree
 
bool $public_enabled
 
StandardGUIRequest $request
 
NotesManager $manager
 
bool $targets_enabled = false
 
bool $export_html = false
 
bool $print = false
 
bool $comments_settings = false
 
string $obj_type
 
bool $private_enabled
 
bool $edit_note_form
 
bool $add_note_form
 
bool $ajax
 
bool $inc_sub
 
int $obj_id
 
 $rep_obj_id
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilObjUser $user
 
ilSetting $settings
 
ilObjectDefinition $obj_definition
 
ilTree $tree
 
ilAccessHandler $access
 
string $default_command = "getListHTML"
 
array $observer = []
 
ILIAS DI UIServices $ui
 
int $news_id = 0
 
bool $hide_new_form = false
 
bool $only_latest = false
 
string $widget_header = ""
 
bool $no_actions = false
 
bool $enable_sorting = true
 
bool $user_img_export_html = false
 
ilLogger $log
 
ilTemplate $form_tpl
 
int $note_type = Note::PRIVATE
 
int $requested_note_id = 0
 
string $requested_note_mess = ""
 
int $requested_news_id = 0
 
bool $delete_note = false
 
string $note_mess = ""
 
array $item_list_gui = []
 
bool $use_obj_title_header = true
 
bool $show_empty_list_message = true
 
bool $show_header = true
 
int $recipient = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from ilNoteGUI
static getListNotesJSCall (string $a_hash, ?string $a_update_code=null)
 Get list notes js call. More...
 
static getListCommentsJSCall (string $a_hash, ?string $a_update_code=null)
 Get list comments js call. More...
 
- Data Fields inherited from ilNoteGUI
bool $public_deletion_enabled = false
 
bool $repository_mode = false
 
bool $old = false
 

Detailed Description

Message GUI.

Definition at line 26 of file class.ilMessageGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilMessageGUI::__construct ( int  $recipient,
  $rep_obj_id = 0,
int  $obj_id = 0,
string  $obj_type = "" 
)

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

References ilNoteGUI\$obj_id, ilNoteGUI\$obj_type, ilNoteGUI\$recipient, ilNoteGUI\$rep_obj_id, ILIAS\GlobalScreen\Provider\__construct(), ilNoteGUI\enablePrivateNotes(), and ilNoteGUI\enablePublicNotes().

37  {
40  $obj_id,
41  $obj_type
42  );
43  $this->enablePrivateNotes(false);
44  $this->enablePublicNotes(false);
45  $this->recipient = $recipient;
46  }
string $obj_type
enablePrivateNotes(bool $a_enable=true)
__construct(Container $dic, ilPlugin $plugin)
enablePublicNotes(bool $a_enable=true)
+ Here is the call graph for this function:

Member Function Documentation

◆ addItemProperties()

ilMessageGUI::addItemProperties ( Note  $note,
array &  $properties 
)
protected

Definition at line 92 of file class.ilMessageGUI.php.

References ilDatePresentation\formatDate(), ILIAS\Notes\Note\getCreationDate(), IL_CAL_DATETIME, and ILIAS\Repository\lng().

92  : void
93  {
95  $properties[$this->lng->txt("create_date")] = $creation_date;
96  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
+ Here is the call graph for this function:

◆ getAddEditItemText()

ilMessageGUI::getAddEditItemText ( )
protected

Definition at line 144 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

144  : string
145  {
146  return $this->lng->txt("notes_add_edit_message");
147  }
+ Here is the call graph for this function:

◆ getAddText()

ilMessageGUI::getAddText ( )
protected

Definition at line 124 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

124  : string
125  {
126  return $this->lng->txt("note_add_message");
127  }
+ Here is the call graph for this function:

◆ getCommentsHTML()

ilMessageGUI::getCommentsHTML ( )

Definition at line 53 of file class.ilMessageGUI.php.

53  : string
54  {
55  throw new ilException("Call to getCommentsHTML is deprecated");
56  }

◆ getDeletedMultipleText()

ilMessageGUI::getDeletedMultipleText ( )
protected

Definition at line 129 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

129  : string
130  {
131  return $this->lng->txt("notes_messages_deleted");
132  }
+ Here is the call graph for this function:

◆ getDeletedSingleText()

ilMessageGUI::getDeletedSingleText ( )
protected

Definition at line 134 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

134  : string
135  {
136  return $this->lng->txt("notes_message_deleted");
137  }
+ Here is the call graph for this function:

◆ getDeleteText()

ilMessageGUI::getDeleteText ( )
protected

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

References ILIAS\Repository\lng().

103  : string
104  {
105  return $this->lng->txt("notes_delete_message");
106  }
+ Here is the call graph for this function:

◆ getFormLabelKey()

ilMessageGUI::getFormLabelKey ( )
protected

Definition at line 98 of file class.ilMessageGUI.php.

98  : string
99  {
100  return "message";
101  }

◆ getHTML()

ilMessageGUI::getHTML ( )

Definition at line 108 of file class.ilMessageGUI.php.

108  : string
109  {
110  throw new ilException("Not implemented.");
111  }

◆ getItemGroupTitle()

ilMessageGUI::getItemGroupTitle ( int  $obj_id = 0)
protected

Definition at line 68 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

68  : string
69  {
70  if (!$this->show_header) {
71  return "";
72  }
73  return $this->lng->txt("notes_messages");
74  }
+ Here is the call graph for this function:

◆ getItemTitle()

ilMessageGUI::getItemTitle ( Note  $note)
protected

Definition at line 76 of file class.ilMessageGUI.php.

References $counterpart_name, ilObjUser\_getAvatar(), ILIAS\Notes\Note\getAuthor(), ilUserUtil\getNamePresentation(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

76  : string
77  {
78  if ($this->anonymised) {
79  if ($note->getAuthor() === $this->user->getId()) {
80  return $this->lng->txt("notes_message_author_you");
81  } else {
82  if ($this->counterpart_name !== "") {
84  }
85  return $this->lng->txt("notes_message_counterpart");
86  }
87  }
88  $avatar = ilObjUser::_getAvatar($note->getAuthor());
89  return ilUserUtil::getNamePresentation($note->getAuthor(), false, false);
90  }
static _getAvatar(int $a_usr_id)
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
+ Here is the call graph for this function:

◆ getLatestItemText()

ilMessageGUI::getLatestItemText ( )
protected

Definition at line 139 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

139  : string
140  {
141  return $this->lng->txt("notes_latest_message");
142  }
+ Here is the call graph for this function:

◆ getListHTML()

ilMessageGUI::getListHTML ( bool  $a_init_form = true)

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

113  : string
114  {
115  return parent::getListHTML($a_init_form);
116  }

◆ getListTitle()

ilMessageGUI::getListTitle ( )
protected

Definition at line 119 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

119  : string
120  {
121  return $this->lng->txt("notes_messages");
122  }
+ Here is the call graph for this function:

◆ getNoEntriesText()

ilMessageGUI::getNoEntriesText ( bool  $search)
protected

Definition at line 58 of file class.ilMessageGUI.php.

References ILIAS\Repository\lng().

58  : string
59  {
60  if (!$search) {
61  $mess_txt = $this->lng->txt("notes_no_messages");
62  } else {
63  $mess_txt = $this->lng->txt("notes_no_messages_found");
64  }
65  return $mess_txt;
66  }
+ Here is the call graph for this function:

◆ getNotesHTML()

ilMessageGUI::getNotesHTML ( )

Definition at line 48 of file class.ilMessageGUI.php.

48  : string
49  {
50  throw new ilException("Call to getNotesHTML is deprecated");
51  }

◆ setAnonymised()

ilMessageGUI::setAnonymised ( bool  $anonymised,
string  $counterpart_name 
)

Definition at line 149 of file class.ilMessageGUI.php.

References $anonymised, and $counterpart_name.

150  {
151  $this->anonymised = $anonymised;
152  $this->counterpart_name = $counterpart_name;
153  }

Field Documentation

◆ $anonymised

bool ilMessageGUI::$anonymised = false
protected

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

Referenced by setAnonymised().

◆ $counterpart_name

string ilMessageGUI::$counterpart_name = ""
protected

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

Referenced by getItemTitle(), and setAnonymised().

◆ $note_type

int ilMessageGUI::$note_type = Note::MESSAGE
protected

Definition at line 28 of file class.ilMessageGUI.php.


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