ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilNoteGUI Class Reference

@ilCtrl_Calls ilNoteGUI: ilCommentGUI More...

+ Inheritance diagram for ilNoteGUI:
+ Collaboration diagram for ilNoteGUI:

Public Member Functions

 __construct (array|int $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 ()
 

Static Public Member Functions

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

bool $public_deletion_enabled = false
 
bool $repository_mode = false
 
bool $old = false
 

Protected Member Functions

 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

ILIAS Notes InternalDomainService $domain
 
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
 
array int $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
 

Detailed Description

@ilCtrl_Calls ilNoteGUI: ilCommentGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilNoteGUI::__construct ( array|int  $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 = "" 
)
Parameters
int | int[]$a_rep_obj_idobject id of repository object (0 for personal desktop)
int$a_obj_idsub-object id (0 for repository items, user id for personal desktop)
string$a_obj_type"pd" for personal desktop
bool$a_include_subobjectsinclude all subobjects of rep object (e.g. pages)
int$a_news_id
bool$ajax
Exceptions
ilCtrlException

Definition at line 101 of file class.ilNoteGUI.php.

109 {
110 global $DIC;
111 $this->user = $DIC->user();
112 $this->settings = $DIC->settings();
113 $this->obj_definition = $DIC["objDefinition"];
114 $this->tree = $DIC->repositoryTree();
115 $this->access = $DIC->access();
116 $this->ui = $DIC->ui();
117 $ilCtrl = $DIC->ctrl();
118 $this->lng = $DIC->language();
119 $this->log = ilLoggerFactory::getLogger('note');
120 $this->search_text = $search_text;
121
122 $ns = $DIC->notes()->internal();
123 $this->manager = $ns
124 ->domain()
125 ->notes();
126 $this->request = $ns
127 ->gui()
128 ->standardRequest();
129 $this->data = $ns->data();
130 $this->domain = $ns->domain();
131 $this->gui = $ns->gui();
132 $this->notes_access = $ns->domain()->noteAccess();
133
134 $this->lng->loadLanguageModule("notes");
135
136 $ilCtrl->saveParameter($this, "notes_only");
137
138 $this->rep_obj_id = $a_rep_obj_id;
139 $this->obj_id = $a_obj_id;
140 $this->obj_type = $a_obj_type;
141 $this->inc_sub = $a_include_subobjects;
142 $this->news_id = $a_news_id;
143
144 // auto-detect object type
145 if (!is_array($a_rep_obj_id) && !$this->obj_type && $a_rep_obj_id) {
146 $this->obj_type = ilObject::_lookupType($a_rep_obj_id);
147 }
148
149 $this->ajax = $ajax;
150
151 $this->ctrl = $ilCtrl;
152
153 $this->add_note_form = false;
154 $this->edit_note_form = false;
155 $this->private_enabled = false;
156
157 if (!is_array($this->rep_obj_id)) {
158 if ($this->manager->commentsActive($this->rep_obj_id)) {
159 $this->public_enabled = true;
160 } else {
161 $this->public_enabled = false;
162 }
163 }
164 $this->targets_enabled = false;
165 $this->export_html = false;
166 $this->print = false;
167 $this->comments_settings = false;
168
169 // default: notes for repository objects
170 $this->setRepositoryMode(true);
171
172 $this->ctrl->saveParameter($this, "note_type");
173 $this->requested_note_id = $this->request->getNoteId();
174 $this->requested_note_mess = $this->request->getNoteMess();
175 $this->requested_news_id = $this->request->getNewsId();
176 }
static getLogger(string $a_component_id)
Get component logger.
string $search_text
setRepositoryMode(bool $a_value)
static _lookupType(int $id, bool $reference=false)
global $DIC
Definition: shib_login.php:26

References $ajax, $DIC, $search_text, ilObject\_lookupType(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilLoggerFactory\getLogger(), ILIAS\Repository\lng(), setRepositoryMode(), ILIAS\Repository\settings(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateComments()

ilNoteGUI::activateComments ( )

Definition at line 307 of file class.ilNoteGUI.php.

307 : void
308 {
309 $ilCtrl = $this->ctrl;
310
311 if ($this->comments_settings) {
312 $this->manager->activateComments($this->rep_obj_id, true);
313 }
314
315 $ilCtrl->redirectByClass(static::class, "getListHTML", "", $this->ajax);
316 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc

References $ctrl, and ilCtrl\redirectByClass().

+ Here is the call graph for this function:

◆ addItemProperties()

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

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 792 of file class.ilNoteGUI.php.

792 : void
793 {
795 if ($note->getType() === Note::PUBLIC) {
796 $properties[$this->lng->txt("create_date")] = $creation_date;
797 }
798 }
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,)
Class for single dates.

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

+ Here is the call graph for this function:

◆ addNote()

ilNoteGUI::addNote ( )

add note

Definition at line 988 of file class.ilNoteGUI.php.

988 : void
989 {
990 $ilUser = $this->user;
991 $ilCtrl = $this->ctrl;
992
993 $text = $this->getNoteForm(
994 "create",
995 $this->note_type
996 )->getData("note") ?? "";
997
998 //if ($this->form->checkInput())
999 if ($text !== "" && !is_array($this->rep_obj_id)) {
1000 $context = $this->data->context(
1001 $this->rep_obj_id,
1002 $this->obj_id,
1003 $this->obj_type,
1004 $this->news_id,
1005 $this->repository_mode
1006 );
1007 $note = $this->data->note(
1008 0,
1009 $context,
1010 $text,
1011 $ilUser->getId(),
1012 $this->note_type,
1013 0,
1014 0,
1015 $this->recipient
1016 );
1017 $this->manager->createNote(
1018 $note,
1019 $this->observer
1020 );
1021
1022 $ilCtrl->setParameter($this, "note_mess", "mod");
1023 }
1024 $ilCtrl->redirect($this, "getListHTML", "", $this->ctrl->isAsynch());
1025 }
ilObjUser $user
getNoteForm(string $mode, int $type, ?Note $note=null)
$text
Definition: xapiexit.php:21

References $text, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ addNoteForm()

ilNoteGUI::addNoteForm ( bool  $a_init_form = true)

get notes list including add note area

Definition at line 962 of file class.ilNoteGUI.php.

964 : string {
965 $this->add_note_form = true;
966 return $this->getListHTML($a_init_form);
967 }
getListHTML(bool $a_init_form=true)

◆ addObserver()

ilNoteGUI::addObserver ( callable  $a_callback)

Add observer.

Definition at line 1277 of file class.ilNoteGUI.php.

1279 : void {
1280 $this->observer[] = $a_callback;
1281 }

◆ cancelAddNote()

ilNoteGUI::cancelAddNote ( )

cancel add note

Definition at line 972 of file class.ilNoteGUI.php.

972 : string
973 {
974 return $this->getListHTML();
975 }

◆ cancelDelete()

ilNoteGUI::cancelDelete ( )

Definition at line 1129 of file class.ilNoteGUI.php.

1129 : string
1130 {
1131 return $this->getListHTML();
1132 }

◆ cancelUpdateNote()

ilNoteGUI::cancelUpdateNote ( )

cancel edit note

Definition at line 980 of file class.ilNoteGUI.php.

980 : string
981 {
982 return $this->getListHTML();
983 }

◆ confirmDelete()

ilNoteGUI::confirmDelete ( )

Definition at line 1134 of file class.ilNoteGUI.php.

1134 : void
1135 {
1136 $ilCtrl = $this->ctrl;
1137
1138 $cnt = 0;
1139 $ids = [$this->request->getNoteId()];
1140 foreach ($ids as $id) {
1141 $note = $this->manager->getById($id);
1142 if ($this->notes_access->canDelete($note, $this->user->getId(), $this->public_deletion_enabled)) {
1143 $this->manager->deleteNote($note, $this->user->getId(), $this->public_deletion_enabled);
1144 $cnt++;
1145 }
1146 }
1147 if ($cnt > 1) {
1148 $ilCtrl->setParameter($this, "note_mess", "ntsdel");
1149 } else {
1150 $ilCtrl->setParameter($this, "note_mess", "ntdel");
1151 }
1152 $ilCtrl->redirect($this, "getListHTML", "", $this->ajax);
1153 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc

References $id, ILIAS\Notes\Note\getId(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ deactivateComments()

ilNoteGUI::deactivateComments ( )

Definition at line 318 of file class.ilNoteGUI.php.

318 : void
319 {
320 $ilCtrl = $this->ctrl;
321
322 if ($this->comments_settings) {
323 $this->manager->activateComments($this->rep_obj_id, false);
324 }
325
326 $ilCtrl->redirectByClass(static::class, "getListHTML", "", $this->ajax);
327 }

References $ctrl, and ilCtrl\redirectByClass().

+ Here is the call graph for this function:

◆ deleteNote()

ilNoteGUI::deleteNote ( )
protected

Definition at line 1088 of file class.ilNoteGUI.php.

1088 : string
1089 {
1092
1093 $f = $this->ui->factory();
1095 $ctrl->setParameter($this, "note_id", $this->requested_note_id);
1096 $note = $this->manager->getById($this->requested_note_id);
1097
1098 $text = $this->getDeleteText();
1099
1100 $mess = $f->messageBox()->confirmation($text);
1101 $item = $this->getItemForNote($note, false);
1102
1103 $b1 = $this->getButton(
1104 "",
1105 $this->lng->txt("cancel"),
1106 "cancelDelete"
1107 );
1108 $b2 = $this->getButton(
1109 "",
1110 $this->lng->txt("delete"),
1111 "confirmDelete"
1112 );
1113
1114 $it_group_title = $this->getItemGroupTitle($note->getContext()->getObjId());
1115 $item_groups = [$f->item()->group($it_group_title, [$item])];
1116 $panel = $f->panel()->listing()->standard("", $item_groups);
1117
1118 $html = $this->renderComponents([$mess, $panel, $b2, $b1]);
1119 $html = str_replace($this->getNoteTextPlaceholder($note), $this->getNoteText($note), $html);
1120
1121 return $this->renderContent($html);
1122 }
static setUseRelativeDates(bool $a_status)
set use relative dates
getNoteText(Note $note)
renderComponents(array $components)
renderContent(string $content)
Render content into notes wrapper.
getItemForNote(Note $note, bool $actions=true)
getButton(string $a_var, string $a_txt, string $a_cmd, string $a_anchor="")
getNoteTextPlaceholder(Note $note)
getItemGroupTitle(int $obj_id=0)

References Vendor\Package\$f, $text, ILIAS\Notes\Note\getContext(), ILIAS\Repository\lng(), ilCtrl\setParameter(), ilDatePresentation\setUseRelativeDates(), ILIAS\Repository\ui(), and ilDatePresentation\useRelativeDates().

+ Here is the call graph for this function:

◆ editNoteForm()

ilNoteGUI::editNoteForm ( bool  $a_init_form = true)

get notes list including add note area

Definition at line 1051 of file class.ilNoteGUI.php.

1053 : string {
1054 $this->edit_note_form = true;
1055
1056 return $this->getListHTML($a_init_form);
1057 }

◆ enableCommentsSettings()

ilNoteGUI::enableCommentsSettings ( bool  $a_enable = true)

Definition at line 258 of file class.ilNoteGUI.php.

258 : void
259 {
260 $this->comments_settings = $a_enable;
261 }

◆ enablePrivateNotes()

ilNoteGUI::enablePrivateNotes ( bool  $a_enable = true)

Definition at line 248 of file class.ilNoteGUI.php.

248 : void
249 {
250 $this->private_enabled = $a_enable;
251 }

Referenced by ilCommentGUI\__construct(), and ilMessageGUI\__construct().

+ Here is the caller graph for this function:

◆ enablePublicNotes()

ilNoteGUI::enablePublicNotes ( bool  $a_enable = true)

Definition at line 253 of file class.ilNoteGUI.php.

253 : void
254 {
255 $this->public_enabled = $a_enable;
256 }

Referenced by ilCommentGUI\__construct(), and ilMessageGUI\__construct().

+ Here is the caller graph for this function:

◆ enablePublicNotesDeletion()

ilNoteGUI::enablePublicNotesDeletion ( bool  $a_enable = true)

Definition at line 263 of file class.ilNoteGUI.php.

263 : void
264 {
265 $this->public_deletion_enabled = $a_enable;
266 }

◆ enableTargets()

ilNoteGUI::enableTargets ( bool  $a_enable = true)

Definition at line 269 of file class.ilNoteGUI.php.

269 : void
270 {
271 $this->targets_enabled = $a_enable;
272 }

◆ executeCommand()

ilNoteGUI::executeCommand ( )

Definition at line 224 of file class.ilNoteGUI.php.

225 {
226 $cmd = $this->ctrl->getCmd($this->getDefaultCommand());
227 $next_class = $this->ctrl->getNextClass($this);
228 switch ($next_class) {
229 case strtolower(ilCommentGUI::class):
230 $gui = $this->gui->getCommentsGUI(
231 $this->rep_obj_id,
232 $this->obj_id,
233 $this->obj_type,
234 $this->news_id,
235 $this->inc_sub,
236 $this->ajax,
237 $this->search_text
238 );
239 $gui->enableCommentsSettings($this->comments_settings);
240 $this->ctrl->forwardCommand($gui);
241 break;
242
243 default:
244 return $this->$cmd();
245 }
246 }
ILIAS Notes InternalGUIService $gui

References $gui, ILIAS\Repository\ctrl(), and getDefaultCommand().

+ Here is the call graph for this function:

◆ exportNotesHTML()

ilNoteGUI::exportNotesHTML ( )

export selected notes to html

Definition at line 1158 of file class.ilNoteGUI.php.

1158 : void
1159 {
1160 $tpl = new ilGlobalTemplate("tpl.main.html", true, true);
1161
1162 $this->export_html = true;
1163 //$tpl->setVariable("CONTENT", $this->getListHTML());
1164 //ilUtil::deliverData($tpl->get(), "notes.html");
1165
1166 $authors = array_unique(array_map(function (Note $note) {
1167 return $note->getAuthor();
1168 }, $this->getNotes()));
1169 $export = new \ILIAS\Notes\Export\NotesHtmlExport(
1170 $this->note_type,
1171 $this->user->getId(),
1172 $authors
1173 );
1174 $export->exportHTML($this->getListHTML());
1175 }
special template class to simplify handling of ITX/PEAR

References ILIAS\Notes\Note\getAuthor(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getAddEditItemText()

ilNoteGUI::getAddEditItemText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 607 of file class.ilNoteGUI.php.

607 : string
608 {
609 return $this->lng->txt("notes_add_edit_note");
610 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getAddText()

ilNoteGUI::getAddText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 587 of file class.ilNoteGUI.php.

587 : string
588 {
589 return $this->lng->txt("note_add_note");
590 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getButton()

ilNoteGUI::getButton ( string  $a_var,
string  $a_txt,
string  $a_cmd,
string  $a_anchor = "" 
)
Exceptions
ilCtrlException

Definition at line 1246 of file class.ilNoteGUI.php.

1253 $f = $this->ui->factory();
1254
1255 if ($this->ajax) {
1256 $button = $f->button()->standard(
1257 $a_txt,
1258 "#"
1259 )->withOnLoadCode(function ($id) use ($ctrl, $a_cmd) {
1260 return
1261 "document.querySelector('#$id').addEventListener('click', () => { ilNotes.cmdAjaxLink(event, '" .
1262 $ctrl->getLinkTargetByClass(static::class, $a_cmd, "", true) .
1263 "');});";
1264 });
1265 } else {
1266 $button = $f->button()->standard(
1267 $a_txt,
1268 $ctrl->getLinkTargetByClass(static::class, $a_cmd, $a_anchor)
1269 );
1270 }
1271 return $button;
1272 }
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
This describes a standard button.
Definition: Standard.php:27

References Vendor\Package\$f, $id, and ilCtrl\getLinkTargetByClass().

+ Here is the call graph for this function:

◆ getCommentsHTML()

ilNoteGUI::getCommentsHTML ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 301 of file class.ilNoteGUI.php.

301 : string
302 {
303 $this->ctrl->redirectByClass(ilCommentGUI::class, "getListHTML", "", $this->ajax);
304 return "";
305 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getDefaultCommand()

ilNoteGUI::getDefaultCommand ( )

Definition at line 219 of file class.ilNoteGUI.php.

219 : string
220 {
222 }
string $default_command

References $default_command.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ getDeletedMultipleText()

ilNoteGUI::getDeletedMultipleText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 592 of file class.ilNoteGUI.php.

592 : string
593 {
594 return $this->lng->txt("notes_notes_deleted");
595 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getDeletedSingleText()

ilNoteGUI::getDeletedSingleText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 597 of file class.ilNoteGUI.php.

597 : string
598 {
599 return $this->lng->txt("notes_note_deleted");
600 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getDeleteText()

ilNoteGUI::getDeleteText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 1124 of file class.ilNoteGUI.php.

1124 : string
1125 {
1126 return $this->lng->txt("notes_delete_note");
1127 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getFormLabelKey()

ilNoteGUI::getFormLabelKey ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 860 of file class.ilNoteGUI.php.

860 : string
861 {
862 return "note";
863 }

◆ getGlyph()

ilNoteGUI::getGlyph ( )

Definition at line 1334 of file class.ilNoteGUI.php.

1334 : string
1335 {
1336 $f = $this->ui->factory();
1337 $r = $this->ui->renderer();
1338 $lng = $this->lng;
1340 $ctrl->setParameter($this, "news_id", $this->news_id);
1343 null,
1344 ilObject::_lookupType($this->rep_obj_id),
1345 $this->rep_obj_id,
1346 $this->obj_type,
1347 $this->obj_id,
1348 $this->news_id
1349 );
1350
1351 $context = $this->data->context(
1352 $this->rep_obj_id,
1353 $this->obj_id,
1354 $this->obj_type,
1355 $this->news_id
1356 );
1357
1358 $cnt[$this->rep_obj_id][$this->note_type] = $this->manager->getNrOfNotesForContext($context, $this->note_type);
1359 $cnt = $cnt[$this->rep_obj_id][$this->note_type] ?? 0;
1360
1361 $widget_el_id = "notew_" . str_replace(";", "_", $hash);
1362 $ctrl->setParameter($this, "hash", $hash);
1363 $update_url = $ctrl->getLinkTarget($this, "updateGlyph", "", true, false);
1364 $query_url = $ctrl->getLinkTarget($this, "getListHtml", "", true, false);
1365 $comps = array();
1366 $c = $f->counter()->status((int) $cnt);
1367 $comps[] = $f->symbol()->glyph()->comment()->withCounter($c)->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
1368 $code = "$('#$id').attr('data-note-key','$hash');\n";
1369 $code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
1370 $code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
1371 $code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
1372 return $code;
1373 });
1374 if ($this->ctrl->isAsynch()) {
1375 $html = $r->renderAsync($comps);
1376 } else {
1377 $html = $r->render($comps);
1378 }
1379 $html = "<span id='" . $widget_el_id . "' data-note-key='$hash' data-note-ui-type='widget' data-note-update-url='$update_url'>" . $html . "</span>";
1380 $ctrl->setParameter($this, "news_id", $this->requested_news_id);
1381 return $html;
1382 }
static buildAjaxHash(int $node_type, ?int $node_id, string $obj_type, int $obj_id, ?string $sub_type=null, ?int $sub_id=null, int $news_id=0)
Build ajax hash.
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
array int $rep_obj_id
ilLanguage $lng
$c
Definition: deliver.php:25

References $c, Vendor\Package\$f, $id, $lng, ilObject\_lookupType(), ilCommonActionDispatcherGUI\buildAjaxHash(), ILIAS\Repository\ctrl(), ilCtrl\getLinkTarget(), ilCtrl\setParameter(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getItemForNote()

ilNoteGUI::getItemForNote ( Note  $note,
bool  $actions = true 
)
protected
Exceptions
ilCtrlException
ilDateTimeException
ilWACException

Definition at line 686 of file class.ilNoteGUI.php.

690 $f = $this->ui->factory();
692 //return $f->item()->standard("");
693
694 $dd_buttons = [];
695
696 // edit note stuff for all private notes
697 if ($actions && $this->notes_access->canEdit($note)) {
698 if (!$this->export_html && !$this->print
699 && !$this->edit_note_form && !$this->add_note_form && !$this->no_actions) {
700 $ctrl->setParameterByClass(static::class, "note_id", $note->getId());
701 $dd_buttons[] = $this->getShyButton(
702 "edit_note",
703 $this->lng->txt("edit"),
704 "editNoteForm",
705 "note_" . $note->getId(),
706 $note->getId()
707 );
708 }
709 }
710
711 // delete note stuff for all private notes
712 if ($actions && !$this->export_html && !$this->print
713 && !$this->no_actions
714 && $this->notes_access->canDelete($note)) {
715 $ctrl->setParameterByClass(static::class, "note_id", $note->getId());
716 $dd_buttons[] = $this->getShyButton(
717 "delete_note",
718 $this->lng->txt("delete"),
719 "deleteNote",
720 "note_" . $note->getId(),
721 $note->getId()
722 );
723 }
724
725
727
728 $properties = [];
729
730 // origin
731 if ($this->targets_enabled) {
732 $target = $this->getTarget($note);
733 if ($target["title"] !== "") {
734 if ($target["link"] === "") {
735 $properties[$this->lng->txt("notes_origin")] = $target["title"];
736 } else {
737 $properties[$this->lng->txt("notes_origin")] = $f
738 ->button()
739 ->shy(
740 $target["title"],
741 $target["link"]
742 );
743 }
744 }
745 }
746
747 // output author account and creation date
748 $img_path = "";
749 $img_alt = "";
750 $avatar = null;
751 $title = $this->getItemTitle($note);
752 if ($note->getType() === Note::PUBLIC) {
753 $avatar = $this->gui->profile()->getAvatar($note->getAuthor());
754 }
755 $this->addItemProperties($note, $properties);
756
757 // last edited
758 if ($note->getUpdateDate() !== null) {
759 $properties[$this->lng->txt("last_edited_on")] = ilDatePresentation::formatDate(
760 new ilDate(
761 $note->getUpdateDate(),
763 )
764 );
765 }
766
767 $item = $f->item()->standard($title)
768 ->withDescription($this->getNoteTextPlaceholder($note))
769 ->withProperties($properties);
770 if (!is_null($avatar)) {
771 $item = $item->withLeadAvatar($avatar);
772 }
773 if (count($dd_buttons) > 0) {
774 $item = $item->withActions(
775 $f->dropdown()->standard($dd_buttons)
776 );
777 }
778 return $item;
779 }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
getTarget(Note $note)
show related objects as links
getShyButton(string $a_var, string $a_txt, string $a_cmd, string $a_anchor="", int $note_id=0)
getItemTitle(Note $note)
addItemProperties(Note $note, array &$properties)
Common interface to all items.
Definition: Item.php:32

References ILIAS\Notes\Note\getId(), ILIAS\Repository\lng(), and ilCtrl\setParameterByClass().

+ Here is the call graph for this function:

◆ getItemGroupTitle()

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

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 666 of file class.ilNoteGUI.php.

666 : string
667 {
668 if (!$this->show_header) {
669 return "";
670 }
671 if (!is_array($this->rep_obj_id) && !$this->getUseObjectTitleHeader()) {
672 $it_group_title = $this->lng->txt("notes");
673 } else {
674 $it_group_title = ($obj_id)
676 : $this->lng->txt("note_without_object");
677 }
678 return $it_group_title;
679 }
static _lookupTitle(int $obj_id)

References ilObject\_lookupTitle(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getItemTitle()

ilNoteGUI::getItemTitle ( Note  $note)
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 781 of file class.ilNoteGUI.php.

781 : string
782 {
784 if ($note->getType() === Note::PUBLIC) {
785 $title = ilUserUtil::getNamePresentation($note->getAuthor(), false, false);
786 } else {
787 $title = $creation_date;
788 }
789 return $title;
790 }
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=null)
Default behaviour is:

References ilDatePresentation\formatDate(), ILIAS\Notes\Note\getAuthor(), ILIAS\Notes\Note\getCreationDate(), ilUserUtil\getNamePresentation(), ILIAS\Notes\Note\getType(), and IL_CAL_DATETIME.

+ Here is the call graph for this function:

◆ getLatestItemText()

ilNoteGUI::getLatestItemText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 602 of file class.ilNoteGUI.php.

602 : string
603 {
604 return "";
605 }

◆ getListCommentsJSCall()

static ilNoteGUI::getListCommentsJSCall ( string  $a_hash,
?string  $a_update_code = null 
)
static

Get list comments js call.

Definition at line 1196 of file class.ilNoteGUI.php.

1199 : string {
1200 if ($a_update_code === null) {
1201 $a_update_code = "null";
1202 } else {
1203 $a_update_code = "'" . $a_update_code . "'";
1204 }
1205
1206 return "ilNotes.listComments(event, '" . $a_hash . "', " . $a_update_code . ");";
1207 }

Referenced by ilObjectListGUI\determineProperties(), ilDclRecordListTableGUI\getCommentJsLinkCode(), ilQuestionBrowserTableGUI\getCommentsAjaxLink(), ilObjectListGUI\getHeaderAction(), ilDclBaseRecordModel\getStandardFieldHTML(), and ilObjectListGUI\insertCommonSocialCommands().

+ Here is the caller graph for this function:

◆ getListHTML()

ilNoteGUI::getListHTML ( bool  $a_init_form = true)

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 286 of file class.ilNoteGUI.php.

286 : string
287 {
288 $content = $this->getNoteListHTML($a_init_form);
289 return $this->renderContent($content);
290 }
getNoteListHTML(bool $a_init_form=true)

References getNoteListHTML(), and renderContent().

Referenced by getNotesHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getListNotesJSCall()

static ilNoteGUI::getListNotesJSCall ( string  $a_hash,
?string  $a_update_code = null 
)
static

Get list notes js call.

Definition at line 1180 of file class.ilNoteGUI.php.

1183 : string {
1184 if ($a_update_code === null) {
1185 $a_update_code = "null";
1186 } else {
1187 $a_update_code = "'" . $a_update_code . "'";
1188 }
1189
1190 return "ilNotes.listNotes(event, '" . $a_hash . "', " . $a_update_code . ");";
1191 }

Referenced by ilObjectListGUI\determineProperties(), ilObjectListGUI\getHeaderAction(), and ilObjectListGUI\insertCommonSocialCommands().

+ Here is the caller graph for this function:

◆ getListTitle()

ilNoteGUI::getListTitle ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 582 of file class.ilNoteGUI.php.

582 : string
583 {
584 return $this->lng->txt("private_notes");
585 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getNoEntriesText()

ilNoteGUI::getNoEntriesText ( bool  $search)
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 612 of file class.ilNoteGUI.php.

612 : string
613 {
614 if (!$search) {
615 $mess_txt = $this->lng->txt("notes_no_notes");
616 } else {
617 $mess_txt = $this->lng->txt("notes_no_notes_found");
618 }
619 return $mess_txt;
620 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getNoteForm()

ilNoteGUI::getNoteForm ( string  $mode,
int  $type,
?Note  $note = null 
)
protected

Definition at line 831 of file class.ilNoteGUI.php.

836 global $DIC;
837
838 $label_key = "note";
839 $label_key .= ($mode === "create")
840 ? "_add"
841 : "_update";
842 $label_key .= "_" . $this->getFormLabelKey($type);
843 $cmd = ($mode === "create")
844 ? "addNote"
845 : "updateNote";
846
847 $value = ($note)
848 ? $note->getText()
849 : "";
850 if ($cmd === "updateNote") {
851 $this->ctrl->setParameter($this, "note_id", $this->requested_note_id);
852 }
853 $action = $this->ctrl->getFormActionByClass(static::class, $cmd, "");
854 $form = $this->gui->form([static::class], $action)
855 ->section("props", $this->lng->txt($label_key))
856 ->textarea("note", $this->lng->txt("note_text"), "", $value);
857 return $form;
858 }

◆ getNoteListHTML()

ilNoteGUI::getNoteListHTML ( bool  $a_init_form = true)

Definition at line 385 of file class.ilNoteGUI.php.

387 : string {
389 $ilCtrl = $this->ctrl;
390 $f = $this->ui->factory();
391 $ilUser = $this->user;
392
393 $mtype = "";
394
395 $notes = $this->getNotes();
396
397 $tpl = new ilTemplate("tpl.notes_list.html", true, true, "components/ILIAS/Notes");
398
399 // show counter if notes are hidden
400 $cnt_str = (count($notes) > 0)
401 ? " (" . count($notes) . ")"
402 : "";
403
404 // origin header
405 $origin_header = $this->getOriginHeader();
406 if ($origin_header != "") {
407 $tpl->setCurrentBlock("title");
408 $tpl->setVariable("TITLE", $origin_header);
409 $tpl->parseCurrentBlock();
410 }
411
412 $tpl->setVariable("TXT_NOTES", $this->getListTitle() . $cnt_str);
413 $anch = "";
414
415 // show add new note text area
416 if (!$this->edit_note_form && !is_array($this->rep_obj_id) &&
417 !$this->hide_new_form && $ilUser->getId() !== ANONYMOUS_USER_ID) {
418 $tpl->setCurrentBlock("edit_note_form");
419 $b_caption = $this->getAddText();
420 $b = $this->ui->factory()->button()->standard(
421 $b_caption,
422 "#"
423 );
424 $tpl->setVariable("EDIT_STYLE", "display:none;");
425 $tpl->setVariable(
426 "EDIT_FORM_ACTION",
427 $ilCtrl->getFormActionByClass(static::class, "addNote", "", true)
428 );
429 $tpl->setVariable(
430 "TXT_CANCEL",
431 $this->lng->txt("cancel")
432 );
433 $tpl->setVariable(
434 "EDIT_FORM_BUTTON",
435 $this->renderComponents([$b])
436 );
437 $tpl->setVariable(
438 "EDIT_FORM",
439 $this->getNoteForm("create", $this->note_type)->render()
440 );
441 $tpl->parseCurrentBlock();
442 }
443
444 // list all notes
447
448 $notes_given = false;
449
450 // edit form
451 if ($this->edit_note_form) {
452 $note = $this->manager->getById($this->requested_note_id);
453 $ilCtrl->setParameterByClass(static::class, "note_id", $this->requested_note_id);
454 $tpl->setVariable(
455 "EDIT_FORM_ACTION",
456 $ilCtrl->getFormActionByClass(static::class, "updateNote", "", true)
457 );
458 $tpl->setVariable(
459 "CANCEL_FORM_ACTION",
460 $ilCtrl->getFormActionByClass(static::class, "cancelUpdateNote", "", true)
461 );
462 $tpl->setVariable("NOTE_FOCUS", "1");
463 $tpl->setVariable(
464 "TXT_CANCEL",
465 $this->lng->txt("cancel")
466 );
467 $tpl->setVariable(
468 "EDIT_FORM",
469 $this->getNoteForm("edit", $this->note_type, $note)->render()
470 );
471 $tpl->parseCurrentBlock();
472 }
473
474 $items = [];
475 $item_groups = [];
476 $text_placeholders = [];
477 $texts = [];
478 $last_obj_id = null;
479 foreach ($notes as $note) {
480 if ($this->only_latest && $notes_given) {
481 continue;
482 }
483
484 $current_obj_id = $note->getContext()->getObjId();
485 if ($last_obj_id !== null && $current_obj_id !== $last_obj_id) {
486 $it_group_title = $this->getItemGroupTitle($last_obj_id);
487 $item_groups[] = $f->item()->group($it_group_title, $items);
488 $items = [];
489 }
490 $last_obj_id = $current_obj_id;
491
492 $items[] = $this->getItemForNote($note);
493 $notes_given = true;
494
495 $text_placeholders[] = $this->getNoteTextPlaceholder($note);
496 $texts[] = $this->getNoteText($note);
497 }
498
499 $it_group_title = $this->getItemGroupTitle((int) $last_obj_id);
500 $item_groups[] = $f->item()->group($it_group_title, $items);
501
502 if ($notes_given) {
503 if (!is_array($this->rep_obj_id)) {
504 $title = $item_groups[0]->getTitle();
505 $item_groups[0] = $f->item()->group("", $item_groups[0]->getItems());
506 } else {
507 $title = "";
508 }
509 $panel = $f->panel()->listing()->standard($title, $item_groups);
510 if (!is_array($this->rep_obj_id) && !$this->no_actions) {
511 $panel = $panel->withActions($this->getSortationControl());
512 }
513 $html = $this->renderComponents([$panel]);
514 $html = str_replace($text_placeholders, $texts, $html);
515 $tpl->setVariable("NOTES_LIST", $html);
516 } elseif (!is_array($this->rep_obj_id)) {
517 $it_group_title = $this->getItemGroupTitle($this->rep_obj_id);
518 $item_groups = [$f->item()->group($it_group_title, [])];
519 $panel = $f->panel()->listing()->standard("", $item_groups);
520 $mess_txt = "";
521 if ($this->show_empty_list_message) {
522 $mess_txt = $this->getNoEntriesText($this->search_text !== "");
523 $mess = $f->messageBox()->info($mess_txt);
524 //$html = $this->renderComponents([$panel, $mess]);
525 $html = $this->renderComponents([$mess]);
526 $tpl->setVariable("NOTES_LIST", $html);
527 }
528 } elseif ($this->search_text !== "") {
529 $mess_txt = $this->getNoEntriesText(true);
530 $mess = $f->messageBox()->info($mess_txt);
531 $tpl->setVariable("NOTES_LIST", $this->renderComponents([$mess]));
532 }
533
535
536 // message
537 $mtxt = "";
538 switch ($this->requested_note_mess !== "" ? $this->requested_note_mess : $this->note_mess) {
539 case "mod":
540 $mtype = "success";
541 $mtxt = $lng->txt("msg_obj_modified");
542 break;
543
544 case "ntsdel":
545 $mtype = "success";
546 $mtxt = $this->getDeletedMultipleText();
547 break;
548
549 case "ntdel":
550 $mtype = "success";
551 $mtxt = $this->getDeletedSingleText();
552 break;
553
554 case "frmfld":
555 $mtype = "failure";
556 $mtxt = $lng->txt("form_input_not_valid");
557 break;
558
559 case "qdel":
560 $mtype = "question";
561 $mtxt = $lng->txt("info_delete_sure");
562 break;
563
564 case "noc":
565 $mtype = "failure";
566 $mtxt = $lng->txt("no_checkbox");
567 break;
568 }
569 if ($mtxt !== "") {
570 $tpl->setVariable("MESS", ilUtil::getSystemMessageHTML($mtxt, $mtype));
571 } else {
572 $tpl->setVariable("MESS", "");
573 }
574
575 if ($this->widget_header !== "") {
576 $tpl->setVariable("WIDGET_HEADER", $this->widget_header);
577 }
578
579 return $tpl->get();
580 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getNoEntriesText(bool $search)
special template class to simplify handling of ITX/PEAR
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.
const ANONYMOUS_USER_ID
Definition: constants.php:27

Referenced by ilCommentGUI\getListHTML(), and getListHTML().

+ Here is the caller graph for this function:

◆ getNotes()

ilNoteGUI::getNotes ( )
protected
Returns
Note[]

Definition at line 332 of file class.ilNoteGUI.php.

332 : array
333 {
334 if ($this->notes === null) {
335 $ilUser = $this->user;
336 $filter = null;
337 if ($this->export_html || $this->print) {
338 if ($this->requested_note_id > 0) {
339 $filter = $this->requested_note_id;
340 } else {
341 $filter = $this->request->getNoteText();
342 }
343 }
344
345 $ascending = $this->manager->getSortAscending();
346 if ($this->only_latest) {
347 $order = false;
348 }
349 $author_id = ($this->note_type === Note::PRIVATE)
350 ? $ilUser->getId()
351 : 0;
352
353 if (!is_array($this->rep_obj_id)) {
354 $notes = $this->manager->getNotesForContext(
355 $this->data->context(
356 $this->rep_obj_id,
357 $this->obj_id,
358 $this->obj_type,
359 $this->news_id,
360 $this->repository_mode
361 ),
364 $author_id,
365 $ascending,
366 "",
368 );
369 } else {
370 $notes = $this->manager->getNotesForRepositoryObjIds(
371 $this->rep_obj_id,
372 $this->note_type,
373 $this->inc_sub,
374 $author_id,
375 $ascending,
376 "",
377 $this->search_text
378 );
379 }
380 $this->notes = $notes;
381 }
382 return $this->notes;
383 }
int $requested_note_id

References $inc_sub, $note_type, $notes, $requested_note_id, $search_text, and $user.

◆ getNotesHTML()

ilNoteGUI::getNotesHTML ( )

Reimplemented in ilCommentGUI, and ilMessageGUI.

Definition at line 279 of file class.ilNoteGUI.php.

279 : string
280 {
281 $ilCtrl = $this->ctrl;
282 $ilCtrl->setParameter($this, "notes_type", Note::PRIVATE);
283 return $this->getListHTML($a_init_form = true);
284 }

References $ctrl, getListHTML(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ getNoteText()

ilNoteGUI::getNoteText ( Note  $note)
protected

Definition at line 805 of file class.ilNoteGUI.php.

805 : string
806 {
807 return (trim($note->getText()) !== "")
808 ? nl2br(htmlentities($note->getText()))
809 : $this->lng->txt("note_content_removed");
810 }

References ILIAS\Notes\Note\getText(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getNoteTextPlaceholder()

ilNoteGUI::getNoteTextPlaceholder ( Note  $note)
protected

Definition at line 800 of file class.ilNoteGUI.php.

800 : string
801 {
802 return "##note-text-" . $note->getId() . "##";
803 }

References ILIAS\Notes\Note\getId().

+ Here is the call graph for this function:

◆ getNumber()

ilNoteGUI::getNumber ( )

Definition at line 1384 of file class.ilNoteGUI.php.

1384 : string
1385 {
1386 $f = $this->ui->factory();
1387 $r = $this->ui->renderer();
1388 $lng = $this->lng;
1390 $ctrl->setParameter($this, "news_id", $this->news_id);
1393 null,
1394 ilObject::_lookupType($this->rep_obj_id),
1395 $this->rep_obj_id,
1396 $this->obj_type,
1397 $this->obj_id,
1398 $this->news_id
1399 );
1400
1401 $context = $this->data->context(
1402 $this->rep_obj_id,
1403 $this->obj_id,
1404 $this->obj_type,
1405 $this->news_id
1406 );
1407
1408 $cnt[$this->rep_obj_id][$this->note_type] = $this->manager->getNrOfNotesForContext($context, $this->note_type);
1409 $cnt = $cnt[$this->rep_obj_id][$this->note_type] ?? 0;
1410
1411 $widget_el_id = "notew_" . str_replace(";", "_", $hash);
1412 $ctrl->setParameter($this, "hash", $hash);
1413 $update_url = $ctrl->getLinkTarget($this, "updateNumber", "", true, false);
1414 $query_url = $ctrl->getLinkTarget($this, "getListHtml", "", true, false);
1415 $comps = array();
1416 $comps[] = $f->button()->shy($cnt, "#")->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
1417 $code = "$('#$id').attr('data-note-key','$hash');\n";
1418 $code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
1419 $code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
1420 $code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
1421 return $code;
1422 });
1423 if ($this->ctrl->isAsynch()) {
1424 $html = $r->renderAsync($comps);
1425 } else {
1426 $html = $r->render($comps);
1427 }
1428 //echo "<br>" . $widget_el_id . ":" . $update_url . "<br>";
1429 $html = "<span id='" . $widget_el_id . "' data-note-key='$hash' data-note-ui-type='widget' data-note-update-url='$update_url'>" . $html . "</span>";
1430 $ctrl->setParameter($this, "news_id", $this->requested_news_id);
1431 return $html;
1432 }

References Vendor\Package\$f, $id, $lng, ilObject\_lookupType(), ilCommonActionDispatcherGUI\buildAjaxHash(), ILIAS\Repository\ctrl(), ilCtrl\getLinkTarget(), ilCtrl\setParameter(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getOriginHeader()

ilNoteGUI::getOriginHeader ( )
protected

Definition at line 1304 of file class.ilNoteGUI.php.

1304 : string
1305 {
1306 if (!is_array($this->rep_obj_id) && !$this->only_latest && $this->ctrl->isAsynch()) {
1307 switch ($this->obj_type) {
1308 case "grpr":
1309 case "catr":
1310 case "crsr":
1311 $title = ilContainerReference::_lookupTitle($this->rep_obj_id);
1312 break;
1313
1314 default:
1315 $title = ilObject::_lookupTitle($this->rep_obj_id);
1316 break;
1317 }
1318
1319 $img = ilUtil::img(ilObject::_getIcon($this->rep_obj_id, "tiny"));
1320
1321 // add sub-object if given
1322 if ($this->obj_id) {
1323 $sub_title = $this->getSubObjectTitle($this->rep_obj_id, $this->obj_id);
1324 if ($sub_title) {
1325 $title .= " - " . $sub_title;
1326 }
1327 }
1328
1329 return $img . " " . $title;
1330 }
1331 return "";
1332 }
static _lookupTitle(int $obj_id)
getSubObjectTitle(int $parent_obj_id, int $sub_obj_id)
Get sub object title if available with callback.
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.

References ilObject\_getIcon(), ilContainerReference\_lookupTitle(), ilObject\_lookupTitle(), ILIAS\Repository\ctrl(), and ilUtil\img().

+ Here is the call graph for this function:

◆ getShowEmptyListMessage()

ilNoteGUI::getShowEmptyListMessage ( )

Definition at line 183 of file class.ilNoteGUI.php.

183 : bool
184 {
186 }
bool $show_empty_list_message

References $show_empty_list_message.

◆ getShowHeader()

ilNoteGUI::getShowHeader ( )

Definition at line 193 of file class.ilNoteGUI.php.

193 : bool
194 {
195 return $this->show_header;
196 }

References $show_header.

◆ getShyButton()

ilNoteGUI::getShyButton ( string  $a_var,
string  $a_txt,
string  $a_cmd,
string  $a_anchor = "",
int  $note_id = 0 
)
Exceptions
ilCtrlException

Definition at line 1212 of file class.ilNoteGUI.php.

1220 $f = $this->ui->factory();
1221
1222 $class = static::class;
1223 if ($this->ajax) {
1224 $button = $f->button()->shy(
1225 $a_txt,
1226 "#"
1227 )->withOnLoadCode(function ($id) use ($ctrl, $a_cmd, $note_id, $class) {
1228 $ctrl->setParameterByClass($class, "note_id", $note_id);
1229 return
1230 "document.querySelector('#$id').addEventListener('click', () => { ilNotes.cmdAjaxLink(event, '" .
1231 $ctrl->getLinkTargetByClass($class, $a_cmd, "", true) .
1232 "');});";
1233 });
1234 } else {
1235 $button = $f->button()->shy(
1236 $a_txt,
1237 $ctrl->getLinkTargetByClass($class, $a_cmd, $a_anchor)
1238 );
1239 }
1240 return $button;
1241 }

References Vendor\Package\$f, $id, ilCtrl\getLinkTargetByClass(), and ilCtrl\setParameterByClass().

Referenced by ilCommentGUI\getListHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSortationControl()

ilNoteGUI::getSortationControl ( )
protected
Exceptions
ilCtrlException

Definition at line 626 of file class.ilNoteGUI.php.

627 {
628 /*
629 $c = $this->lng->txt("create_date") . ", ";
630 $options = [
631 'desc' => $c . $this->lng->txt("sorting_desc"),
632 'asc' => $c . $this->lng->txt("sorting_asc")
633 ];
634 $select_option = (true)
635 ? 'asc'
636 : 'desc';
637 $s = $this->ui->factory()->viewControl()->sortation($options, $select_option)
638 ->withTargetURL($this->ctrl->getLinkTarget($this, "setSortation"), 'sortation');
639 */
640 $dd_buttons = [];
641 if ($this->manager->getSortAscending()) {
642 $dd_buttons[] = $this->getShyButton(
643 "sort",
644 $this->lng->txt("notes_sort_desc"),
645 "listSortDesc",
646 "",
647 0
648 );
649 } else {
650 $dd_buttons[] = $this->getShyButton(
651 "sort",
652 $this->lng->txt("notes_sort_asc"),
653 "listSortAsc",
654 "",
655 0
656 );
657 }
658
659 $s = $this->ui->factory()->dropdown()->standard(
660 $dd_buttons
661 );
662
663 return $s;
664 }
This describes a Standard Dropdown.
Definition: Standard.php:27

References ILIAS\Repository\lng(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getSubObjectTitle()

ilNoteGUI::getSubObjectTitle ( int  $parent_obj_id,
int  $sub_obj_id 
)
protected

Get sub object title if available with callback.

Definition at line 815 of file class.ilNoteGUI.php.

818 : string {
819 $objDefinition = $this->obj_definition;
820 $parent_type = ilObject::_lookupType($parent_obj_id);
821 if ($parent_type === "") {
822 return "";
823 }
824 $parent_class = "ilObj" . $objDefinition->getClassName($parent_type) . "GUI";
825 if (method_exists($parent_class, "lookupSubObjectTitle")) {
826 return call_user_func_array(array($parent_class, "lookupSubObjectTitle"), array($parent_obj_id, $sub_obj_id));
827 }
828 return "";
829 }
ilObjectDefinition $obj_definition

◆ getTarget()

ilNoteGUI::getTarget ( Note  $note)

show related objects as links

Definition at line 868 of file class.ilNoteGUI.php.

870 : array {
872 $ilAccess = $this->access;
873 $objDefinition = $this->obj_definition;
874 $ilUser = $this->user;
875
876 $title = "";
877 $link = "";
878
879 $a_note_id = $note->getId();
880 $context = $note->getContext();
881 $a_obj_type = $context->getType();
882 $a_obj_id = $context->getSubObjId();
883
884 if ($context->getObjId() > 0) {
885 // get first visible reference
886 $vis_ref_id = 0;
887 $ref_ids = ilObject::_getAllReferences($context->getObjId());
888 foreach ($ref_ids as $ref_id) {
889 if ($vis_ref_id > 0) {
890 break;
891 }
892 if ($ilAccess->checkAccess("visible", "", $ref_id)) {
893 $vis_ref_id = $ref_id;
894 }
895 }
896
897 // if we got the reference id
898 if ($vis_ref_id > 0) {
899 $type = ilObject::_lookupType($vis_ref_id, true);
900 $title = ilObject::_lookupTitle($context->getObjId());
901
902 if ($type === "poll") {
903 $link = ilLink::_getLink($vis_ref_id, "poll");
904 } elseif ($a_obj_type !== "pg") {
905 if (!isset($this->item_list_gui[$type])) {
906 $class = $objDefinition->getClassName($type);
907 $full_class = "ilObj" . $class . "ListGUI";
908 $this->item_list_gui[$type] = new $full_class();
909 }
910
911 // for references, get original title
912 // (link will lead to orignal, which basically is wrong though)
913 if ($a_obj_type === "crsr" || $a_obj_type === "catr" || $a_obj_type === "grpr") {
914 $tgt_obj_id = ilContainerReference::_lookupTargetId($context->getObjId());
915 $title = ilObject::_lookupTitle($tgt_obj_id);
916 }
917 $this->item_list_gui[$type]->initItem($vis_ref_id, $context->getObjId(), $title, $a_obj_type);
918 $link = $this->item_list_gui[$type]->getCommandLink("infoScreen");
919 if ($link === "") {
920 $link = (string) $this->domain->staticUrl()->builder()->build($type, new ReferenceId($vis_ref_id));
921 } else {
922 $link = $this->item_list_gui[$type]->appendRepositoryFrameParameter($link) . "#note_" . $a_note_id;
923 }
924 } else {
925 $title = ilObject::_lookupTitle($context->getObjId());
926 $link = "goto.php?target=pg_" . $a_obj_id . "_" . $vis_ref_id;
927 }
928 } else { // personal workspace
929 // we only need 1 instance
930 if (!isset($this->wsp_tree)) {
931 $this->wsp_tree = new ilWorkspaceTree($ilUser->getId());
932 $this->wsp_access_handler = new ilWorkspaceAccessHandler($this->wsp_tree);
933 }
934 $node_id = $this->wsp_tree->lookupNodeId($context->getObjId());
935 if ($this->wsp_access_handler->checkAccess("visible", "", $node_id)) {
936 $path = $this->wsp_tree->getPathFull($node_id);
937 if ($path) {
938 $item = array_pop($path);
939 $title = $item["title"];
940 $link = ilWorkspaceAccessHandler::getGotoLink($node_id, $context->getObjId());
941 }
942 // shared resource
943 else {
944 $owner = ilObject::_lookupOwner($context->getObjId());
945 $title = ilObject::_lookupTitle($context->getObjId()) .
946 " (" . ilObject::_lookupOwnerName($owner) . ")";
947 $link = "ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace&dsh=" .
948 $owner;
949 }
950 }
951 }
952 }
953 return [
954 "title" => $title,
955 "link" => $link,
956 ];
957 }
static _lookupTargetId(int $a_obj_id)
ilAccessHandler $access
static _lookupOwnerName(int $owner_id)
Lookup owner name for owner id.
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
static _getAllReferences(int $id)
get all reference ids for object ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getGotoLink(int $a_node_id, int $a_obj_id, string $a_additional="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:66
$path
Definition: ltiservices.php:30

References $path, $ref_id, ilObject\_getAllReferences(), ilObject\_lookupOwner(), ilObject\_lookupOwnerName(), ilContainerReference\_lookupTargetId(), ilObject\_lookupTitle(), ilObject\_lookupType(), and ilWorkspaceAccessHandler\getGotoLink().

+ Here is the call graph for this function:

◆ getTriggerShyButton()

ilNoteGUI::getTriggerShyButton ( )

Definition at line 1434 of file class.ilNoteGUI.php.

1435 {
1436 $f = $this->ui->factory();
1437 $r = $this->ui->renderer();
1438 $lng = $this->lng;
1440 $ctrl->setParameter($this, "news_id", $this->news_id);
1443 null,
1444 ilObject::_lookupType($this->rep_obj_id),
1445 $this->rep_obj_id,
1446 $this->obj_type,
1447 $this->obj_id,
1448 $this->news_id
1449 );
1450
1451 $context = $this->data->context(
1452 $this->rep_obj_id,
1453 $this->obj_id,
1454 $this->obj_type,
1455 $this->news_id
1456 );
1457
1458 $widget_el_id = "notew_" . str_replace(";", "_", $hash);
1459 $ctrl->setParameter($this, "hash", $hash);
1460 $update_url = $ctrl->getLinkTarget($this, "updateNumber", "", true, false);
1461 $query_url = $ctrl->getLinkTarget($this, "getListHtml", "", true, false);
1462 $but = $f->button()->shy($this->lng->txt("comments"), "#")->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
1463 $code = "$('#$id').attr('data-note-key','$hash');\n";
1464 $code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
1465 $code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
1466 $code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
1467 return $code;
1468 });
1469 return $but;
1470 }

References Vendor\Package\$f, $id, $lng, ilObject\_lookupType(), ilCommonActionDispatcherGUI\buildAjaxHash(), ilCtrl\getLinkTarget(), ILIAS\Repository\lng(), ilCtrl\setParameter(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getUseObjectTitleHeader()

ilNoteGUI::getUseObjectTitleHeader ( )

Definition at line 204 of file class.ilNoteGUI.php.

204 : bool
205 {
207 }
bool $use_obj_title_header

References $use_obj_title_header.

◆ getWidget()

ilNoteGUI::getWidget ( )

Definition at line 1472 of file class.ilNoteGUI.php.

1472 : string
1473 {
1474 $f = $this->ui->factory();
1475 $r = $this->ui->renderer();
1476 $lng = $this->lng;
1478 $ctrl->setParameter($this, "news_id", $this->news_id);
1481 null,
1482 ilObject::_lookupType($this->rep_obj_id),
1483 $this->rep_obj_id,
1484 $this->obj_type,
1485 $this->obj_id,
1486 $this->news_id
1487 );
1488
1489 $context = $this->data->context(
1490 $this->rep_obj_id,
1491 $this->obj_id,
1492 $this->obj_type,
1493 $this->news_id
1494 );
1495
1496 $cnt[$this->rep_obj_id][$this->note_type] = $this->manager->getNrOfNotesForContext($context, $this->note_type);
1497 $cnt = $cnt[$this->rep_obj_id][$this->note_type] ?? 0;
1498
1499 $tpl = new ilTemplate("tpl.note_widget_header.html", true, true, "components/ILIAS/Notes");
1500 $widget_el_id = "notew_" . str_replace(";", "_", $hash);
1501 $ctrl->setParameter($this, "hash", $hash);
1502 $update_url = $ctrl->getLinkTarget($this, "updateWidget", "", true, false);
1503 $query_url = $ctrl->getLinkTarget($this, "getListHtml", "", true, false);
1504 $comps = array();
1505 if ($cnt > 0) {
1506 $c = $f->counter()->status((int) $cnt);
1507 $comps[] = $f->symbol()->glyph()->comment()->withCounter($c)->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
1508 $code = "$('#$id').attr('data-note-key','$hash');\n";
1509 $code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
1510 $code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
1511 $code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
1512 return $code;
1513 });
1514 $comps[] = $f->divider()->vertical();
1515 $tpl->setVariable("GLYPH", $r->render($comps));
1516 $tpl->setVariable("TXT_LATEST", $this->getLatestItemText());
1517 }
1518
1519 $b = $f->button()->shy($this->getAddEditItemText(), "#")->withAdditionalOnLoadCode(function ($id) use ($hash, $query_url) {
1520 $code = "$('#$id').attr('data-note-key','$hash');\n";
1521 $code .= "$('#$id').attr('data-note-ui-type','trigger');\n";
1522 $code .= "$('#$id').attr('data-note-query-url','" . $query_url . "');\n";
1523 $code .= "$(\"#$id\").click(function(event) { ilNotes.clickTrigger(event)});";
1524 return $code;
1525 });
1526 if ($ctrl->isAsynch()) {
1527 $tpl->setVariable("SHY_BUTTON", $r->renderAsync($b));
1528 } else {
1529 $tpl->setVariable("SHY_BUTTON", $r->render($b));
1530 }
1531
1532 $this->widget_header = $tpl->get();
1533
1534 $this->hide_new_form = true;
1535 $this->only_latest = true;
1536 $this->no_actions = true;
1537 $html = "<div id='" . $widget_el_id . "' data-note-key='$hash' data-note-ui-type='widget' data-note-update-url='$update_url'>" . $this->getNoteListHTML() . "</div>";
1538 $ctrl->setParameter($this, "news_id", $this->requested_news_id);
1539 return $html;
1540 }
isAsynch()
@inheritDoc

References Vendor\Package\$b, $c, Vendor\Package\$f, $id, $lng, ilObject\_lookupType(), ilCommonActionDispatcherGUI\buildAjaxHash(), ilCtrl\getLinkTarget(), ilCtrl\isAsynch(), ilCtrl\setParameter(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ listSortAsc()

ilNoteGUI::listSortAsc ( )
protected

Definition at line 1283 of file class.ilNoteGUI.php.

1283 : string
1284 {
1285 $this->manager->setSortAscending(true);
1286 return $this->getListHTML();
1287 }

◆ listSortDesc()

ilNoteGUI::listSortDesc ( )
protected

Definition at line 1289 of file class.ilNoteGUI.php.

1289 : string
1290 {
1291 $this->manager->setSortAscending(false);
1292 return $this->getListHTML();
1293 }

◆ renderComponents()

ilNoteGUI::renderComponents ( array  $components)
protected

Definition at line 292 of file class.ilNoteGUI.php.

292 : string
293 {
294 if ($this->ctrl->isAsynch()) {
295 return $this->ui->renderer()->renderAsync($components);
296 }
297 return $this->ui->renderer()->render($components);
298 }
$components

References ILIAS\Repository\ctrl(), and ILIAS\Repository\ui().

Referenced by ilCommentGUI\getListHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderContent()

ilNoteGUI::renderContent ( string  $content)

Render content into notes wrapper.

Definition at line 1062 of file class.ilNoteGUI.php.

1062 : string
1063 {
1064 $lng = $this->lng;
1066
1067 $ntpl = new ilTemplate(
1068 "tpl.notes_and_comments.html",
1069 true,
1070 true,
1071 "components/ILIAS/Notes"
1072 );
1073
1074 if (!$ctrl->isAsynch()) {
1075 $ntpl->setVariable("OUTER_ID", " id='notes_embedded_outer' ");
1076 }
1077
1078 $ntpl->setVariable("CONTENT", $content);
1079
1080 if ($ctrl->isAsynch() && !$this->request->isFilterCommand()) {
1081 echo $ntpl->get();
1082 exit;
1083 }
1084
1085 return $ntpl->get();
1086 }
exit

References $lng, exit, and ilCtrl\isAsynch().

Referenced by ilCommentGUI\getListHTML(), and getListHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDefaultCommand()

ilNoteGUI::setDefaultCommand ( string  $a_val)

Definition at line 209 of file class.ilNoteGUI.php.

209 : void
210 {
211 $this->default_command = $a_val;
212 }

◆ setExportMode()

ilNoteGUI::setExportMode ( )

Definition at line 1296 of file class.ilNoteGUI.php.

1296 : void
1297 {
1298 $this->hide_new_form = true;
1299 $this->no_actions = true;
1300 $this->enable_sorting = false;
1301 $this->user_img_export_html = true;
1302 }

◆ setHideNewForm()

ilNoteGUI::setHideNewForm ( bool  $a_val)

Definition at line 214 of file class.ilNoteGUI.php.

214 : void
215 {
216 $this->hide_new_form = $a_val;
217 }

◆ setRepositoryMode()

ilNoteGUI::setRepositoryMode ( bool  $a_value)

Definition at line 274 of file class.ilNoteGUI.php.

274 : void
275 {
276 $this->repository_mode = $a_value;
277 }

Referenced by __construct(), and ilObjPortfolioBaseGUI\getCommentGUI().

+ Here is the caller graph for this function:

◆ setShowEmptyListMessage()

ilNoteGUI::setShowEmptyListMessage ( bool  $a_val)

Definition at line 178 of file class.ilNoteGUI.php.

178 : void
179 {
180 $this->show_empty_list_message = $a_val;
181 }

◆ setShowHeader()

ilNoteGUI::setShowHeader ( bool  $a_val)

Definition at line 188 of file class.ilNoteGUI.php.

188 : void
189 {
190 $this->show_header = $a_val;
191 }

◆ setUseObjectTitleHeader()

ilNoteGUI::setUseObjectTitleHeader ( bool  $a_val)

Definition at line 199 of file class.ilNoteGUI.php.

199 : void
200 {
201 $this->use_obj_title_header = $a_val;
202 }

Referenced by ILIAS\MediaCast\Comments\GUIService\commentGUI().

+ Here is the caller graph for this function:

◆ updateGlyph()

ilNoteGUI::updateGlyph ( )
protected

Definition at line 1548 of file class.ilNoteGUI.php.

1548 : void
1549 {
1550 echo $this->getGlyph();
1551 exit;
1552 }

References exit.

◆ updateNote()

ilNoteGUI::updateNote ( )

Definition at line 1027 of file class.ilNoteGUI.php.

1027 : void
1028 {
1029 $ilCtrl = $this->ctrl;
1030
1031 $note = $this->manager->getById($this->requested_note_id);
1032 $text = $this->getNoteForm(
1033 "edit",
1034 $this->note_type
1035 )->getData("note") ?? "";
1036
1037 if ($this->notes_access->canEdit($note)) {
1038 $this->manager->updateNoteText(
1039 $this->requested_note_id,
1040 $text,
1041 $this->observer
1042 );
1043 $ilCtrl->setParameter($this, "note_mess", "mod");
1044 }
1045 $ilCtrl->redirect($this, "getListHTML", "", $this->ctrl->isAsynch());
1046 }

References $text, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ updateNumber()

ilNoteGUI::updateNumber ( )
protected

Definition at line 1554 of file class.ilNoteGUI.php.

1554 : void
1555 {
1556 echo $this->getNumber();
1557 exit;
1558 }

References exit.

◆ updateWidget()

ilNoteGUI::updateWidget ( )
protected

Definition at line 1542 of file class.ilNoteGUI.php.

1542 : void
1543 {
1544 echo $this->getWidget();
1545 exit;
1546 }

References exit.

Field Documentation

◆ $access

ilAccessHandler ilNoteGUI::$access
protected

Definition at line 64 of file class.ilNoteGUI.php.

◆ $add_note_form

bool ilNoteGUI::$add_note_form
protected

Definition at line 50 of file class.ilNoteGUI.php.

◆ $ajax

bool ilNoteGUI::$ajax
protected

Definition at line 51 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\__construct(), and __construct().

◆ $comments_settings

bool ilNoteGUI::$comments_settings = false
protected

Definition at line 46 of file class.ilNoteGUI.php.

◆ $ctrl

ilCtrl ilNoteGUI::$ctrl
protected

◆ $data

ILIAS Notes InternalDataService ilNoteGUI::$data
protected

Definition at line 37 of file class.ilNoteGUI.php.

◆ $default_command

string ilNoteGUI::$default_command = "getListHTML"
protected

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

Referenced by getDefaultCommand().

◆ $delete_note

bool ilNoteGUI::$delete_note = false
protected

Definition at line 84 of file class.ilNoteGUI.php.

◆ $domain

ILIAS Notes InternalDomainService ilNoteGUI::$domain
protected

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

◆ $edit_note_form

bool ilNoteGUI::$edit_note_form
protected

Definition at line 49 of file class.ilNoteGUI.php.

◆ $enable_sorting

bool ilNoteGUI::$enable_sorting = true
protected

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

◆ $export_html

bool ilNoteGUI::$export_html = false
protected

Definition at line 44 of file class.ilNoteGUI.php.

◆ $form_tpl

ilTemplate ilNoteGUI::$form_tpl
protected

Definition at line 79 of file class.ilNoteGUI.php.

◆ $gui

ILIAS Notes InternalGUIService ilNoteGUI::$gui
protected

Definition at line 34 of file class.ilNoteGUI.php.

Referenced by executeCommand().

◆ $hide_new_form

bool ilNoteGUI::$hide_new_form = false
protected

Definition at line 72 of file class.ilNoteGUI.php.

◆ $inc_sub

bool ilNoteGUI::$inc_sub
protected

Definition at line 52 of file class.ilNoteGUI.php.

Referenced by getNotes().

◆ $item_list_gui

array ilNoteGUI::$item_list_gui = []
protected

Definition at line 86 of file class.ilNoteGUI.php.

◆ $lng

ilLanguage ilNoteGUI::$lng
protected

Definition at line 59 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\getListHTML().

◆ $log

ilLogger ilNoteGUI::$log
protected

Definition at line 78 of file class.ilNoteGUI.php.

◆ $manager

NotesManager ilNoteGUI::$manager
protected

Definition at line 42 of file class.ilNoteGUI.php.

◆ $news_id

int ilNoteGUI::$news_id = 0
protected

Definition at line 71 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\__construct().

◆ $no_actions

bool ilNoteGUI::$no_actions = false
protected

Definition at line 75 of file class.ilNoteGUI.php.

◆ $note_mess

string ilNoteGUI::$note_mess = ""
protected

Definition at line 85 of file class.ilNoteGUI.php.

◆ $note_type

int ilNoteGUI::$note_type = Note::PRIVATE
protected

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

Referenced by getNotes().

◆ $notes

array ilNoteGUI::$notes = null
protected

Definition at line 33 of file class.ilNoteGUI.php.

Referenced by getNotes().

◆ $notes_access

ILIAS Notes AccessManager ilNoteGUI::$notes_access
protected

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

◆ $obj_definition

ilObjectDefinition ilNoteGUI::$obj_definition
protected

Definition at line 62 of file class.ilNoteGUI.php.

◆ $obj_id

int ilNoteGUI::$obj_id
protected

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

Referenced by ilCommentGUI\__construct(), and ilMessageGUI\__construct().

◆ $obj_type

string ilNoteGUI::$obj_type
protected

Definition at line 47 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\__construct(), and ilMessageGUI\__construct().

◆ $observer

array ilNoteGUI::$observer = []
protected

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

◆ $old

bool ilNoteGUI::$old = false

Definition at line 67 of file class.ilNoteGUI.php.

◆ $only_latest

bool ilNoteGUI::$only_latest = false
protected

Definition at line 73 of file class.ilNoteGUI.php.

◆ $print

bool ilNoteGUI::$print = false
protected

Definition at line 45 of file class.ilNoteGUI.php.

◆ $private_enabled

bool ilNoteGUI::$private_enabled
protected

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

◆ $public_deletion_enabled

bool ilNoteGUI::$public_deletion_enabled = false

Definition at line 65 of file class.ilNoteGUI.php.

◆ $public_enabled

bool ilNoteGUI::$public_enabled
protected

Definition at line 40 of file class.ilNoteGUI.php.

◆ $recipient

int ilNoteGUI::$recipient = 0
protected

Definition at line 90 of file class.ilNoteGUI.php.

Referenced by ilMessageGUI\__construct().

◆ $rep_obj_id

array int ilNoteGUI::$rep_obj_id
protected

Definition at line 57 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\__construct(), and ilMessageGUI\__construct().

◆ $repository_mode

bool ilNoteGUI::$repository_mode = false

Definition at line 66 of file class.ilNoteGUI.php.

◆ $request

StandardGUIRequest ilNoteGUI::$request
protected

Definition at line 41 of file class.ilNoteGUI.php.

◆ $requested_news_id

int ilNoteGUI::$requested_news_id = 0
protected

Definition at line 83 of file class.ilNoteGUI.php.

◆ $requested_note_id

int ilNoteGUI::$requested_note_id = 0
protected

Definition at line 81 of file class.ilNoteGUI.php.

Referenced by getNotes().

◆ $requested_note_mess

string ilNoteGUI::$requested_note_mess = ""
protected

Definition at line 82 of file class.ilNoteGUI.php.

◆ $search_text

string ilNoteGUI::$search_text
protected

Definition at line 35 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\__construct(), __construct(), and getNotes().

◆ $settings

ilSetting ilNoteGUI::$settings
protected

Definition at line 61 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\getListHTML().

◆ $show_empty_list_message

bool ilNoteGUI::$show_empty_list_message = true
protected

Definition at line 88 of file class.ilNoteGUI.php.

Referenced by getShowEmptyListMessage().

◆ $show_header

bool ilNoteGUI::$show_header = true
protected

Definition at line 89 of file class.ilNoteGUI.php.

Referenced by getShowHeader().

◆ $targets_enabled

bool ilNoteGUI::$targets_enabled = false
protected

Definition at line 43 of file class.ilNoteGUI.php.

◆ $tree

ilTree ilNoteGUI::$tree
protected

Definition at line 63 of file class.ilNoteGUI.php.

◆ $ui

ILIAS DI UIServices ilNoteGUI::$ui
protected

Definition at line 70 of file class.ilNoteGUI.php.

◆ $use_obj_title_header

bool ilNoteGUI::$use_obj_title_header = true
protected

Definition at line 87 of file class.ilNoteGUI.php.

Referenced by getUseObjectTitleHeader().

◆ $user

ilObjUser ilNoteGUI::$user
protected

Definition at line 60 of file class.ilNoteGUI.php.

Referenced by ilCommentGUI\getListHTML(), and getNotes().

◆ $user_img_export_html

bool ilNoteGUI::$user_img_export_html = false
protected

Definition at line 77 of file class.ilNoteGUI.php.

◆ $widget_header

string ilNoteGUI::$widget_header = ""
protected

Definition at line 74 of file class.ilNoteGUI.php.

◆ $wsp_access_handler

ilWorkspaceAccessHandler ilNoteGUI::$wsp_access_handler
protected

Definition at line 38 of file class.ilNoteGUI.php.

◆ $wsp_tree

ilWorkspaceTree ilNoteGUI::$wsp_tree
protected

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


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