ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilNoteGUI Class Reference

@ilCtrl_Calls ilNoteGUI: ilCommentGUI More...

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

Public Member Functions

 __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 ()
 

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

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
 

Detailed Description

@ilCtrl_Calls ilNoteGUI: ilCommentGUI

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

Constructor & Destructor Documentation

◆ __construct()

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 = "" 
)
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

Reimplemented in ilCommentGUI.

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

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

309 : void
310 {
311 $ilCtrl = $this->ctrl;
312
313 if ($this->comments_settings) {
314 $this->manager->activateComments($this->rep_obj_id, true);
315 }
316
317 $ilCtrl->redirectByClass(static::class, "getListHTML", "", $this->ajax);
318 }
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 794 of file class.ilNoteGUI.php.

794 : void
795 {
797 if ($note->getType() === Note::PUBLIC) {
798 $properties[$this->lng->txt("create_date")] = $creation_date;
799 }
800 }
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 986 of file class.ilNoteGUI.php.

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

References $context, 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 960 of file class.ilNoteGUI.php.

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

◆ addObserver()

ilNoteGUI::addObserver ( callable  $a_callback)

Add observer.

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

1277 : void {
1278 $this->observer[] = $a_callback;
1279 }

◆ cancelAddNote()

ilNoteGUI::cancelAddNote ( )

cancel add note

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

970 : string
971 {
972 return $this->getListHTML();
973 }

◆ cancelDelete()

ilNoteGUI::cancelDelete ( )

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

1127 : string
1128 {
1129 return $this->getListHTML();
1130 }

◆ cancelUpdateNote()

ilNoteGUI::cancelUpdateNote ( )

cancel edit note

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

978 : string
979 {
980 return $this->getListHTML();
981 }

◆ confirmDelete()

ilNoteGUI::confirmDelete ( )

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

1132 : void
1133 {
1134 $ilCtrl = $this->ctrl;
1135
1136 $cnt = 0;
1137 $ids = [$this->request->getNoteId()];
1138 foreach ($ids as $id) {
1139 $note = $this->manager->getById($id);
1140 if ($this->notes_access->canDelete($note, $this->user->getId(), $this->public_deletion_enabled)) {
1141 $this->manager->deleteNote($note, $this->user->getId(), $this->public_deletion_enabled);
1142 $cnt++;
1143 }
1144 }
1145 if ($cnt > 1) {
1146 $ilCtrl->setParameter($this, "note_mess", "ntsdel");
1147 } else {
1148 $ilCtrl->setParameter($this, "note_mess", "ntdel");
1149 }
1150 $ilCtrl->redirect($this, "getListHTML", "", $this->ajax);
1151 }
$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 320 of file class.ilNoteGUI.php.

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

References $ctrl, and ilCtrl\redirectByClass().

+ Here is the call graph for this function:

◆ deleteNote()

ilNoteGUI::deleteNote ( )
protected

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

1086 : string
1087 {
1090
1091 $f = $this->ui->factory();
1093 $ctrl->setParameter($this, "note_id", $this->requested_note_id);
1094 $note = $this->manager->getById($this->requested_note_id);
1095
1096 $text = $this->getDeleteText();
1097
1098 $mess = $f->messageBox()->confirmation($text);
1099 $item = $this->getItemForNote($note, false);
1100
1101 $b1 = $this->getButton(
1102 "",
1103 $this->lng->txt("cancel"),
1104 "cancelDelete"
1105 );
1106 $b2 = $this->getButton(
1107 "",
1108 $this->lng->txt("delete"),
1109 "confirmDelete"
1110 );
1111
1112 $it_group_title = $this->getItemGroupTitle($note->getContext()->getObjId());
1113 $item_groups = [$f->item()->group($it_group_title, [$item])];
1114 $panel = $f->panel()->listing()->standard("", $item_groups);
1115
1116 $html = $this->renderComponents([$mess, $panel, $b2, $b1]);
1117 $html = str_replace($this->getNoteTextPlaceholder($note), $this->getNoteText($note), $html);
1118
1119 return $this->renderContent($html);
1120 }
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, 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 1049 of file class.ilNoteGUI.php.

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

◆ enableCommentsSettings()

ilNoteGUI::enableCommentsSettings ( bool  $a_enable = true)

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

255 : void
256 {
257 $this->comments_settings = $a_enable;
258 }

◆ enablePrivateNotes()

ilNoteGUI::enablePrivateNotes ( bool  $a_enable = true)

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

245 : void
246 {
247 $this->private_enabled = $a_enable;
248 }

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 250 of file class.ilNoteGUI.php.

250 : void
251 {
252 $this->public_enabled = $a_enable;
253 }

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 260 of file class.ilNoteGUI.php.

260 : void
261 {
262 $this->public_deletion_enabled = $a_enable;
263 }

◆ enableTargets()

ilNoteGUI::enableTargets ( bool  $a_enable = true)

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

266 : void
267 {
268 $this->targets_enabled = $a_enable;
269 }

◆ executeCommand()

ilNoteGUI::executeCommand ( )

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

222 {
223 $cmd = $this->ctrl->getCmd($this->getDefaultCommand());
224 $next_class = $this->ctrl->getNextClass($this);
225 switch ($next_class) {
226 case strtolower(ilCommentGUI::class):
227 $gui = $this->gui->getCommentsGUI(
228 $this->rep_obj_id,
229 $this->obj_id,
230 $this->obj_type,
231 $this->news_id,
232 $this->inc_sub,
233 $this->ajax,
234 $this->search_text
235 );
236 $gui->enableCommentsSettings($this->comments_settings);
237 $this->ctrl->forwardCommand($gui);
238 break;
239
240 default:
241 return $this->$cmd();
242 }
243 }
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 1156 of file class.ilNoteGUI.php.

1156 : void
1157 {
1158 $tpl = new ilGlobalTemplate("tpl.main.html", true, true);
1159
1160 $this->export_html = true;
1161 //$tpl->setVariable("CONTENT", $this->getListHTML());
1162 //ilUtil::deliverData($tpl->get(), "notes.html");
1163
1164 $authors = array_unique(array_map(function (Note $note) {
1165 return $note->getAuthor();
1166 }, $this->getNotes()));
1167 $export = new \ILIAS\Notes\Export\NotesHtmlExport(
1168 $this->note_type,
1169 $this->user->getId(),
1170 $authors
1171 );
1172 $export->exportHTML($this->getListHTML());
1173 }
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 609 of file class.ilNoteGUI.php.

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

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getAddText()

ilNoteGUI::getAddText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

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

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

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 1244 of file class.ilNoteGUI.php.

1251 $f = $this->ui->factory();
1252
1253 if ($this->ajax) {
1254 $button = $f->button()->standard(
1255 $a_txt,
1256 "#"
1257 )->withOnLoadCode(function ($id) use ($ctrl, $a_cmd) {
1258 return
1259 "document.querySelector('#$id').addEventListener('click', () => { ilNotes.cmdAjaxLink(event, '" .
1260 $ctrl->getLinkTargetByClass(static::class, $a_cmd, "", true) .
1261 "');});";
1262 });
1263 } else {
1264 $button = $f->button()->standard(
1265 $a_txt,
1266 $ctrl->getLinkTargetByClass(static::class, $a_cmd, $a_anchor)
1267 );
1268 }
1269 return $button;
1270 }
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 303 of file class.ilNoteGUI.php.

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

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getDefaultCommand()

ilNoteGUI::getDefaultCommand ( )

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

216 : string
217 {
219 }
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 594 of file class.ilNoteGUI.php.

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

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getDeletedSingleText()

ilNoteGUI::getDeletedSingleText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

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

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

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getDeleteText()

ilNoteGUI::getDeleteText ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

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

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

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getFormLabelKey()

ilNoteGUI::getFormLabelKey ( )
protected

Reimplemented in ilCommentGUI, and ilMessageGUI.

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

862 : string
863 {
864 return "note";
865 }

◆ getGlyph()

ilNoteGUI::getGlyph ( )

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

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

References $c, $context, 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 688 of file class.ilNoteGUI.php.

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

668 : string
669 {
670 if (!$this->show_header) {
671 return "";
672 }
673 if (!is_array($this->rep_obj_id) && !$this->getUseObjectTitleHeader()) {
674 $it_group_title = $this->lng->txt("notes");
675 } else {
676 $it_group_title = ($obj_id)
678 : $this->lng->txt("note_without_object");
679 }
680 return $it_group_title;
681 }
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 783 of file class.ilNoteGUI.php.

783 : string
784 {
786 if ($note->getType() === Note::PUBLIC) {
787 $title = ilUserUtil::getNamePresentation($note->getAuthor(), false, false);
788 } else {
789 $title = $creation_date;
790 }
791 return $title;
792 }
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 604 of file class.ilNoteGUI.php.

604 : string
605 {
606 return "";
607 }

◆ getListCommentsJSCall()

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

Get list comments js call.

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

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

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 283 of file class.ilNoteGUI.php.

283 : string
284 {
285 $ilUser = $this->user;
287 $ilCtrl = $this->ctrl;
289
290 $content = $this->getNoteListHTML($a_init_form);
291 return $this->renderContent($content);
292 }
ilSetting $settings
getNoteListHTML(bool $a_init_form=true)
global $ilSetting
Definition: privfeed.php:31

References $ctrl, $ilSetting, $lng, $settings, $user, 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 1178 of file class.ilNoteGUI.php.

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

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 584 of file class.ilNoteGUI.php.

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

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 614 of file class.ilNoteGUI.php.

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

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 833 of file class.ilNoteGUI.php.

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

◆ getNoteListHTML()

ilNoteGUI::getNoteListHTML ( bool  $a_init_form = true)

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

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

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

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

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

+ Here is the call graph for this function:

◆ getNoteText()

ilNoteGUI::getNoteText ( Note  $note)
protected

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

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

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 802 of file class.ilNoteGUI.php.

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

References ILIAS\Notes\Note\getId().

+ Here is the call graph for this function:

◆ getNumber()

ilNoteGUI::getNumber ( )

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

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

References $context, 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 1302 of file class.ilNoteGUI.php.

1302 : string
1303 {
1304 if (!is_array($this->rep_obj_id) && !$this->only_latest && $this->ctrl->isAsynch()) {
1305 switch ($this->obj_type) {
1306 case "grpr":
1307 case "catr":
1308 case "crsr":
1309 $title = ilContainerReference::_lookupTitle($this->rep_obj_id);
1310 break;
1311
1312 default:
1313 $title = ilObject::_lookupTitle($this->rep_obj_id);
1314 break;
1315 }
1316
1317 $img = ilUtil::img(ilObject::_getIcon($this->rep_obj_id, "tiny"));
1318
1319 // add sub-object if given
1320 if ($this->obj_id) {
1321 $sub_title = $this->getSubObjectTitle($this->rep_obj_id, $this->obj_id);
1322 if ($sub_title) {
1323 $title .= " - " . $sub_title;
1324 }
1325 }
1326
1327 return $img . " " . $title;
1328 }
1329 return "";
1330 }
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 180 of file class.ilNoteGUI.php.

180 : bool
181 {
183 }
bool $show_empty_list_message

References $show_empty_list_message.

◆ getShowHeader()

ilNoteGUI::getShowHeader ( )

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

190 : bool
191 {
192 return $this->show_header;
193 }

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 1210 of file class.ilNoteGUI.php.

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

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 628 of file class.ilNoteGUI.php.

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

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

◆ getTarget()

ilNoteGUI::getTarget ( Note  $note)

show related objects as links

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

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

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

References $context, 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 201 of file class.ilNoteGUI.php.

201 : bool
202 {
204 }
bool $use_obj_title_header

References $use_obj_title_header.

◆ getWidget()

ilNoteGUI::getWidget ( )

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

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

References Vendor\Package\$b, $c, $context, 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 1281 of file class.ilNoteGUI.php.

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

◆ listSortDesc()

ilNoteGUI::listSortDesc ( )
protected

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

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

◆ renderComponents()

ilNoteGUI::renderComponents ( array  $components)
protected

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

294 : string
295 {
296 if ($this->ctrl->isAsynch()) {
297 return $this->ui->renderer()->renderAsync($components);
298 }
299 return $this->ui->renderer()->render($components);
300 }
$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 1060 of file class.ilNoteGUI.php.

1060 : string
1061 {
1062 $lng = $this->lng;
1064
1065 $ntpl = new ilTemplate(
1066 "tpl.notes_and_comments.html",
1067 true,
1068 true,
1069 "components/ILIAS/Notes"
1070 );
1071
1072 if (!$ctrl->isAsynch()) {
1073 $ntpl->setVariable("OUTER_ID", " id='notes_embedded_outer' ");
1074 }
1075
1076 $ntpl->setVariable("CONTENT", $content);
1077
1078 if ($ctrl->isAsynch() && !$this->request->isFilterCommand()) {
1079 echo $ntpl->get();
1080 exit;
1081 }
1082
1083 return $ntpl->get();
1084 }
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 206 of file class.ilNoteGUI.php.

206 : void
207 {
208 $this->default_command = $a_val;
209 }

◆ setExportMode()

ilNoteGUI::setExportMode ( )

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

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

◆ setHideNewForm()

ilNoteGUI::setHideNewForm ( bool  $a_val)

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

211 : void
212 {
213 $this->hide_new_form = $a_val;
214 }

◆ setRepositoryMode()

ilNoteGUI::setRepositoryMode ( bool  $a_value)

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

271 : void
272 {
273 $this->repository_mode = $a_value;
274 }

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

+ Here is the caller graph for this function:

◆ setShowEmptyListMessage()

ilNoteGUI::setShowEmptyListMessage ( bool  $a_val)

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

175 : void
176 {
177 $this->show_empty_list_message = $a_val;
178 }

◆ setShowHeader()

ilNoteGUI::setShowHeader ( bool  $a_val)

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

185 : void
186 {
187 $this->show_header = $a_val;
188 }

◆ setUseObjectTitleHeader()

ilNoteGUI::setUseObjectTitleHeader ( bool  $a_val)

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

196 : void
197 {
198 $this->use_obj_title_header = $a_val;
199 }

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

+ Here is the caller graph for this function:

◆ updateGlyph()

ilNoteGUI::updateGlyph ( )
protected

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

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

References exit.

◆ updateNote()

ilNoteGUI::updateNote ( )

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

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

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ updateNumber()

ilNoteGUI::updateNumber ( )
protected

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

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

References exit.

◆ updateWidget()

ilNoteGUI::updateWidget ( )
protected

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

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

References exit.

Field Documentation

◆ $access

ilAccessHandler ilNoteGUI::$access
protected

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

◆ $add_note_form

bool ilNoteGUI::$add_note_form
protected

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

◆ $ajax

bool ilNoteGUI::$ajax
protected

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

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

◆ $comments_settings

bool ilNoteGUI::$comments_settings = false
protected

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

◆ $ctrl

ilCtrl ilNoteGUI::$ctrl
protected

◆ $data

ILIAS Notes InternalDataService ilNoteGUI::$data
protected

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

◆ $default_command

string ilNoteGUI::$default_command = "getListHTML"
protected

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

Referenced by getDefaultCommand().

◆ $delete_note

bool ilNoteGUI::$delete_note = false
protected

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

◆ $edit_note_form

bool ilNoteGUI::$edit_note_form
protected

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

◆ $enable_sorting

bool ilNoteGUI::$enable_sorting = true
protected

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

◆ $export_html

bool ilNoteGUI::$export_html = false
protected

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

◆ $form_tpl

ilTemplate ilNoteGUI::$form_tpl
protected

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

◆ $gui

ILIAS Notes InternalGUIService ilNoteGUI::$gui
protected

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

Referenced by executeCommand().

◆ $hide_new_form

bool ilNoteGUI::$hide_new_form = false
protected

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

◆ $inc_sub

bool ilNoteGUI::$inc_sub
protected

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

Referenced by getNotes().

◆ $item_list_gui

array ilNoteGUI::$item_list_gui = []
protected

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

◆ $lng

ilLanguage ilNoteGUI::$lng
protected

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

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

◆ $log

ilLogger ilNoteGUI::$log
protected

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

◆ $manager

NotesManager ilNoteGUI::$manager
protected

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

◆ $news_id

int ilNoteGUI::$news_id = 0
protected

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

Referenced by ilCommentGUI\__construct().

◆ $no_actions

bool ilNoteGUI::$no_actions = false
protected

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

◆ $note_mess

string ilNoteGUI::$note_mess = ""
protected

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

◆ $note_type

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

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

Referenced by getNotes().

◆ $notes

array ilNoteGUI::$notes = null
protected

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

Referenced by getNotes().

◆ $notes_access

ILIAS Notes AccessManager ilNoteGUI::$notes_access
protected

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

◆ $obj_definition

ilObjectDefinition ilNoteGUI::$obj_definition
protected

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

◆ $obj_id

int ilNoteGUI::$obj_id
protected

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

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

◆ $obj_type

string ilNoteGUI::$obj_type
protected

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

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

◆ $observer

array ilNoteGUI::$observer = []
protected

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

◆ $old

bool ilNoteGUI::$old = false

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

◆ $only_latest

bool ilNoteGUI::$only_latest = false
protected

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

◆ $print

bool ilNoteGUI::$print = false
protected

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

◆ $private_enabled

bool ilNoteGUI::$private_enabled
protected

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

◆ $public_deletion_enabled

bool ilNoteGUI::$public_deletion_enabled = false

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

◆ $public_enabled

bool ilNoteGUI::$public_enabled
protected

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

◆ $recipient

int ilNoteGUI::$recipient = 0
protected

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

Referenced by ilMessageGUI\__construct().

◆ $rep_obj_id

ilNoteGUI::$rep_obj_id
protected

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

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

◆ $repository_mode

bool ilNoteGUI::$repository_mode = false

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

◆ $request

StandardGUIRequest ilNoteGUI::$request
protected

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

◆ $requested_news_id

int ilNoteGUI::$requested_news_id = 0
protected

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

◆ $requested_note_id

int ilNoteGUI::$requested_note_id = 0
protected

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

Referenced by getNotes().

◆ $requested_note_mess

string ilNoteGUI::$requested_note_mess = ""
protected

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

◆ $search_text

string ilNoteGUI::$search_text
protected

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

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

◆ $settings

ilSetting ilNoteGUI::$settings
protected

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

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

◆ $show_empty_list_message

bool ilNoteGUI::$show_empty_list_message = true
protected

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

Referenced by getShowEmptyListMessage().

◆ $show_header

bool ilNoteGUI::$show_header = true
protected

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

Referenced by getShowHeader().

◆ $targets_enabled

bool ilNoteGUI::$targets_enabled = false
protected

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

◆ $tree

ilTree ilNoteGUI::$tree
protected

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

◆ $ui

ILIAS DI UIServices ilNoteGUI::$ui
protected

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

◆ $use_obj_title_header

bool ilNoteGUI::$use_obj_title_header = true
protected

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

Referenced by getUseObjectTitleHeader().

◆ $user

ilObjUser ilNoteGUI::$user
protected

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

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

◆ $user_img_export_html

bool ilNoteGUI::$user_img_export_html = false
protected

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

◆ $widget_header

string ilNoteGUI::$widget_header = ""
protected

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

◆ $wsp_access_handler

ilWorkspaceAccessHandler ilNoteGUI::$wsp_access_handler
protected

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

◆ $wsp_tree

ilWorkspaceTree ilNoteGUI::$wsp_tree
protected

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


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