ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilChatroomAdminSmileyGUI Class Reference

Class ilChatroomAdminSmileyGUI Provides methods to show, add, edit and delete smilies consisting of icon and keywords. More...

+ Inheritance diagram for ilChatroomAdminSmileyGUI:
+ Collaboration diagram for ilChatroomAdminSmileyGUI:

Public Member Functions

 executeDefault (string $requestedMethod)
 
 view ()
 Switches GUI to visible mode and calls editSmiliesObject method which prepares and displays the table of existing smilies. More...
 
 editSmiliesObject ()
 Shows existing smilies table Prepares existing smilies table and displays it. More...
 
 initSmiliesForm ()
 
 showEditSmileyEntryFormObject ()
 Shows EditSmileyEntryForm Prepares EditSmileyEntryForm and displays it. More...
 
 initSmiliesEditForm (array $form_data)
 
 showDeleteSmileyFormObject ()
 Shows DeleteSmileyForm Prepares DeleteSmileyForm and displays it. More...
 
 deleteSmileyObject ()
 
 deleteMultipleObject ()
 Shows confirmation view for deleting multiple smilies Prepares confirmation view for deleting multiple smilies and displays it. More...
 
 confirmedDeleteMultipleObject ()
 
- Public Member Functions inherited from ilChatroomGUIHandler
 execute (string $method)
 
 executeDefault (string $requestedMethod)
 
 redirectIfNoPermission ($permission)
 Checks for requested permissions and redirects if the permission check failed. More...
 
 isSuccessful ($response)
 Checks for success param in an json decoded response. More...
 
 sendResponse ($response, bool $isJson=false)
 Sends a json encoded response and exits the php process. More...
 
 hasPermission (string $permission)
 

Static Public Member Functions

static _checkSetup ()
 
static _getSmileyDir (bool $withBaseDir=true)
 

Protected Member Functions

 getSmileyFormDataById (int $smileyId)
 
- Protected Member Functions inherited from ilChatroomGUIHandler
 getRequestValue (string $key, Transformation $trafo, $default=null)
 
 hasRequestValue (string $key)
 
 getRoomByObjectId (int $objectId)
 
 exitIfNoRoomExists (?ilChatroom $room)
 Checks if a ilChatroom exists. More...
 
 exitIfNoRoomModeratePermission (ilChatroom $room, int $subRoom, ilChatroomUser $chatUser)
 Check if user can moderate a chatroom. More...
 
 canModerate (ilChatroom $room, int $subRoom, int $usrId)
 
 isMainRoom (int $subRoomId)
 

Protected Attributes

ilPropertyFormGUI $form_gui = null
 
- Protected Attributes inherited from ilChatroomGUIHandler
ilChatroomObjectGUI $gui
 
ilObjUser $ilUser
 
ilCtrlInterface $ilCtrl
 
ilLanguage $ilLng
 
Filesystem $webDirectory
 
ilObjectService $obj_service
 
FileUpload $upload
 
ilRbacSystem $rbacsystem
 
ilGlobalTemplateInterface $mainTpl
 
ILIAS $ilias
 
ilNavigationHistory $navigationHistory
 
ilTree $tree
 
ilTabsGUI $tabs
 
UIFactory $uiFactory
 
UIRenderer $uiRenderer
 
GlobalHttpState $http
 
Refinery $refinery
 

Static Private Member Functions

static _insertDefaultValues ()
 

Detailed Description

Class ilChatroomAdminSmileyGUI Provides methods to show, add, edit and delete smilies consisting of icon and keywords.

Author
Andreas Kordosz akord.nosp@m.osz@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

◆ _checkSetup()

static ilChatroomAdminSmileyGUI::_checkSetup ( )
static

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

References $DIC, $path, and ilFileUtils\makeDirParents().

53  : bool
54  {
55  global $DIC;
56  $main_tpl = $DIC->ui()->mainTemplate();
57 
58  $path = self::_getSmileyDir();
59 
60  if (!is_dir($path)) {
61  $main_tpl->setOnScreenMessage('info', $DIC->language()->txt('chat_smilies_dir_not_exists'));
63 
64  if (!is_dir($path)) {
65  $main_tpl->setOnScreenMessage('failure', $DIC->language()->txt('chat_smilies_dir_not_available'));
66  return false;
67  }
68 
69  $smilies = [
70  'icon_smile.gif',
71  'icon_wink.gif',
72  'icon_laugh.gif',
73  'icon_sad.gif',
74  'icon_shocked.gif',
75  'icon_tongue.gif',
76  'icon_cool.gif',
77  'icon_eek.gif',
78  'icon_angry.gif',
79  'icon_flush.gif',
80  'icon_idea.gif',
81  'icon_thumbup.gif',
82  'icon_thumbdown.gif',
83  ];
84 
85  foreach ($smilies as $smiley) {
86  copy("templates/default/images/emoticons/$smiley", $path . "/$smiley");
87  }
88 
89  self::_insertDefaultValues();
90 
91  $main_tpl->setOnScreenMessage('success', $DIC->language()->txt('chat_smilies_initialized'));
92  }
93 
94  if (!is_writable($path)) {
95  $main_tpl->setOnScreenMessage('info', $DIC->language()->txt('chat_smilies_dir_not_writable'));
96  }
97 
98  return true;
99  }
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
$path
Definition: ltiservices.php:32
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ _getSmileyDir()

static ilChatroomAdminSmileyGUI::_getSmileyDir ( bool  $withBaseDir = true)
static

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

References $path, and ilFileUtils\getWebspaceDir().

101  : string
102  {
103  $path = 'chatroom/smilies';
104 
105  if ($withBaseDir) {
107  }
108 
109  return $path;
110  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
$path
Definition: ltiservices.php:32
+ Here is the call graph for this function:

◆ _insertDefaultValues()

static ilChatroomAdminSmileyGUI::_insertDefaultValues ( )
staticprivate

Definition at line 112 of file class.ilChatroomAdminSmileyGUI.php.

112  : void
113  {
114  $values = [
115  ["icon_smile.gif", ":)\n:-)\n:smile:"],
116  ["icon_wink.gif", ";)\n;-)\n:wink:"],
117  ["icon_laugh.gif", ":D\n:-D\n:laugh:\n:grin:\n:biggrin:"],
118  ["icon_sad.gif", ":(\n:-(\n:sad:"],
119  ["icon_shocked.gif", ":o\n:-o\n:shocked:"],
120  ["icon_tongue.gif", ":p\n:-p\n:tongue:"],
121  ["icon_cool.gif", ":cool:"],
122  ["icon_eek.gif", ":eek:"],
123  ["icon_angry.gif", ":||\n:-||\n:angry:"],
124  ["icon_flush.gif", ":flush:"],
125  ["icon_idea.gif", ":idea:"],
126  ["icon_thumbup.gif", ":thumbup:"],
127  ["icon_thumbdown.gif", ":thumbdown:"],
128  ];
129 
130  foreach ($values as $val) {
131  ilChatroomSmilies::_storeSmiley($val[1], $val[0]);
132  }
133  }

◆ confirmedDeleteMultipleObject()

ilChatroomAdminSmileyGUI::confirmedDeleteMultipleObject ( )

Definition at line 494 of file class.ilChatroomAdminSmileyGUI.php.

References ilChatroomSmilies\_prepareKeywords(), ilChatroomGUIHandler\getRequestValue(), ilChatroomSmilies\getSmiliesBasePath(), initSmiliesForm(), ILIAS\Repository\refinery(), ilUtil\stripSlashes(), ILIAS\Repository\upload(), and view().

494  : void
495  {
496  if (!$this->rbacsystem->checkAccess('write', $this->gui->getRefId())) {
497  $this->ilias->raiseError(
498  $this->ilLng->txt('msg_no_perm_write'),
499  $this->ilias->error_obj->MESSAGE
500  );
501  }
502 
503  $ids = $this->getRequestValue(
504  'sel_ids',
505  $this->refinery->kindlyTo()->listOf(
506  $this->refinery->kindlyTo()->int()
507  ),
508  []
509  );
510 
511  if ($ids === []) {
512  $this->ilCtrl->redirect($this->gui, 'smiley');
513  }
514 
515  ilChatroomSmilies::_deleteMultipleSmilies($ids);
516 
517  $this->ilCtrl->redirect($this->gui, 'smiley');
518  }
getRequestValue(string $key, Transformation $trafo, $default=null)
header include for all ilias files.
+ Here is the call graph for this function:

◆ deleteMultipleObject()

ilChatroomAdminSmileyGUI::deleteMultipleObject ( )

Shows confirmation view for deleting multiple smilies Prepares confirmation view for deleting multiple smilies and displays it.

Definition at line 448 of file class.ilChatroomAdminSmileyGUI.php.

References ilChatroomGUIHandler\getRequestValue(), ilUtil\img(), and ILIAS\Repository\refinery().

448  : void
449  {
450  $this->gui->switchToVisibleMode();
451 
452  if (!$this->rbacsystem->checkAccess('write', $this->gui->getRefId())) {
453  $this->ilias->raiseError(
454  $this->ilLng->txt('msg_no_perm_write'),
455  $this->ilias->error_obj->MESSAGE
456  );
457  }
458 
459  $ids = $this->getRequestValue(
460  'smiley_id',
461  $this->refinery->kindlyTo()->listOf(
462  $this->refinery->kindlyTo()->int()
463  ),
464  []
465  );
466  if ($ids === []) {
467  $this->mainTpl->setOnScreenMessage('info', $this->ilLng->txt('select_one'), true);
468  $this->ilCtrl->redirect($this->gui, 'smiley');
469  }
470 
471  $smilies = ilChatroomSmilies::_getSmiliesById($ids);
472  if ($smilies === []) {
473  $this->mainTpl->setOnScreenMessage('info', $this->ilLng->txt('select_one'), true);
474  $this->ilCtrl->redirect($this->gui, 'smiley');
475  }
476 
477  $confirmation = new ilConfirmationGUI();
478  $confirmation->setFormAction($this->ilCtrl->getFormAction($this->gui, 'smiley'));
479  $confirmation->setHeaderText($this->ilLng->txt('chatroom_confirm_delete_smiley'));
480  $confirmation->setConfirm($this->ilLng->txt('confirm'), 'smiley-confirmedDeleteMultipleObject');
481  $confirmation->setCancel($this->ilLng->txt('cancel'), 'smiley');
482 
483  foreach ($smilies as $s) {
484  $confirmation->addItem(
485  'sel_ids[]',
486  (string) $s['smiley_id'],
487  ilUtil::img($s['smiley_fullpath'], $s['smiley_keywords']) . ' ' . $s['smiley_keywords']
488  );
489  }
490 
491  $this->mainTpl->setContent($confirmation->getHTML());
492  }
getRequestValue(string $key, Transformation $trafo, $default=null)
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
header include for all ilias files.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ deleteSmileyObject()

ilChatroomAdminSmileyGUI::deleteSmileyObject ( )

Definition at line 365 of file class.ilChatroomAdminSmileyGUI.php.

References $data, ilChatroomSmilies\_prepareKeywords(), ilChatroomGUIHandler\getRequestValue(), getSmileyFormDataById(), ilChatroomSmilies\getSmiliesBasePath(), initSmiliesEditForm(), ILIAS\Repository\refinery(), showEditSmileyEntryFormObject(), ilUtil\stripSlashes(), and ILIAS\Repository\upload().

365  : void
366  {
367  if (!$this->rbacsystem->checkAccess('write', $this->gui->getRefId())) {
368  $this->ilias->raiseError(
369  $this->ilLng->txt('msg_no_perm_write'),
370  $this->ilias->error_obj->MESSAGE
371  );
372  }
373 
374  $smileyId = $this->getRequestValue(
375  'chatroom_smiley_id',
376  $this->refinery->kindlyTo()->int()
377  );
378 
379  ilChatroomSmilies::_deleteSmiley($smileyId);
380 
381  $this->ilCtrl->redirect($this->gui, 'smiley');
382  }
getRequestValue(string $key, Transformation $trafo, $default=null)
header include for all ilias files.
+ Here is the call graph for this function:

◆ editSmiliesObject()

ilChatroomAdminSmileyGUI::editSmiliesObject ( )

Shows existing smilies table Prepares existing smilies table and displays it.

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

References ilChatroomSmiliesGUI\_getExistingSmiliesTable(), and initSmiliesForm().

Referenced by view().

139  : void
140  {
141  if (!$this->rbacsystem->checkAccess('read', $this->gui->getRefId())) {
142  $this->ilias->raiseError(
143  $this->ilLng->txt('msg_no_perm_read'),
144  $this->ilias->error_obj->MESSAGE
145  );
146  }
147 
148  ilChatroomSmilies::_checkSetup();
149 
150  if (null === $this->form_gui) {
151  $this->form_gui = $this->initSmiliesForm();
152  }
153 
155 
156  $tpl_smilies = new ilTemplate(
157  'tpl.chatroom_edit_smilies.html',
158  true,
159  true,
160  'Modules/Chatroom'
161  );
162  $tpl_smilies->setVariable('SMILEY_TABLE', $table);
163  $tpl_smilies->setVariable('SMILEY_FORM', $this->form_gui->getHTML());
164 
165  $this->mainTpl->setContent($tpl_smilies->get());
166  }
static _getExistingSmiliesTable(ilChatroomObjectGUI $a_ref)
header include for all ilias files.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeDefault()

ilChatroomAdminSmileyGUI::executeDefault ( string  $requestedMethod)

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

References view().

33  : void
34  {
35  $this->view();
36  }
view()
Switches GUI to visible mode and calls editSmiliesObject method which prepares and displays the table...
+ Here is the call graph for this function:

◆ getSmileyFormDataById()

ilChatroomAdminSmileyGUI::getSmileyFormDataById ( int  $smileyId)
protected
Parameters
int$smileyId
Returns
array{chatroom_smiley_id: int, chatroom_smiley_keywords: string, chatroom_current_smiley_image_path: string}

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

Referenced by deleteSmileyObject(), and showEditSmileyEntryFormObject().

255  : array
256  {
257  $smiley = ilChatroomSmilies::_getSmiley($smileyId);
258 
259  return [
260  'chatroom_smiley_id' => $smiley['smiley_id'],
261  'chatroom_smiley_keywords' => $smiley['smiley_keywords'],
262  'chatroom_current_smiley_image_path' => $smiley['smiley_fullpath'],
263  ];
264  }
+ Here is the caller graph for this function:

◆ initSmiliesEditForm()

ilChatroomAdminSmileyGUI::initSmiliesEditForm ( array  $form_data)
Parameters
array<string,mixed>$form_data
Returns
ilPropertyFormGUI

Definition at line 270 of file class.ilChatroomAdminSmileyGUI.php.

References $form_gui, ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), ilFileInputGUI\setSuffixes(), ilChatroomSmiliesCurrentSmileyFormElement\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by deleteSmileyObject(), and showEditSmileyEntryFormObject().

271  {
272  $this->form_gui = new ilPropertyFormGUI();
273  $this->form_gui->setValuesByArray($form_data);
274 
275  if ($this->http->wrapper()->query()->has('_table_nav')) {
276  $this->ilCtrl->setParameter(
277  $this->gui,
278  '_table_nav',
279  $this->http->wrapper()->query()->retrieve('_table_nav', $this->refinery->kindlyTo()->string())
280  );
281  }
282 
283  $this->ilCtrl->saveParameter($this->gui, 'smiley_id');
284  $this->form_gui->setFormAction($this->ilCtrl->getFormAction($this->gui, 'smiley-updateSmiliesObject'));
285 
286  $sec_l = new ilFormSectionHeaderGUI();
287 
288  $sec_l->setTitle($this->ilLng->txt('chatroom_edit_smiley'));
289  $this->form_gui->addItem($sec_l);
290 
292  $this->ilLng->txt('chatroom_current_smiley_image_path'),
293  'chatroom_current_smiley_image_path'
294  );
295 
296  $inp->setValue($form_data['chatroom_current_smiley_image_path']);
297  $this->form_gui->addItem($inp);
298 
299  $inp = new ilImageFileInputGUI(
300  $this->ilLng->txt('chatroom_image_path'),
301  'chatroom_image_path'
302  );
303  $inp->setSuffixes(['jpg', 'jpeg', 'png', 'gif', 'svg']);
304 
305  $inp->setRequired(false);
306  $inp->setInfo($this->ilLng->txt('chatroom_smiley_image_only_if_changed'));
307  $this->form_gui->addItem($inp);
308 
309  $inp = new ilTextAreaInputGUI(
310  $this->ilLng->txt('chatroom_smiley_keywords'),
311  'chatroom_smiley_keywords'
312  );
313 
314  $inp->setValue($form_data['chatroom_smiley_keywords']);
315  $inp->setUseRte(false);
316  $inp->setRequired(true);
317  $inp->setInfo($this->ilLng->txt('chatroom_smiley_keywords_one_per_line_note'));
318  $this->form_gui->addItem($inp);
319 
320  $inp = new ilHiddenInputGUI('chatroom_smiley_id');
321 
322  $this->form_gui->addItem($inp);
323  $this->form_gui->addCommandButton(
324  'smiley-updateSmiliesObject',
325  $this->ilLng->txt('submit')
326  );
327  $this->form_gui->addCommandButton('smiley', $this->ilLng->txt('cancel'));
328 
329  return $this->form_gui;
330  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSuffixes(array $a_suffixes)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
Class ilChatroomSmiliesCurrentSmileyFormElement Simple form element that displays an image; does not ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSmiliesForm()

ilChatroomAdminSmileyGUI::initSmiliesForm ( )

Definition at line 168 of file class.ilChatroomAdminSmileyGUI.php.

References $DIC, $form_gui, ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), ilFormPropertyGUI\setRequired(), and ilFileInputGUI\setSuffixes().

Referenced by confirmedDeleteMultipleObject(), and editSmiliesObject().

169  {
170  global $DIC;
171 
172  $this->form_gui = new ilPropertyFormGUI();
173 
174  if ($this->http->wrapper()->query()->has('_table_nav')) {
175  $this->ilCtrl->setParameter(
176  $this->gui,
177  '_table_nav',
178  $this->http->wrapper()->query()->retrieve('_table_nav', $this->refinery->kindlyTo()->string())
179  );
180  }
181  $this->form_gui->setFormAction($this->ilCtrl->getFormAction($this->gui, 'smiley-uploadSmileyObject'));
182 
183  $sec_l = new ilFormSectionHeaderGUI();
184 
185  $sec_l->setTitle($this->ilLng->txt('chatroom_add_smiley'));
186  $this->form_gui->addItem($sec_l);
187 
188  $inp = new ilImageFileInputGUI(
189  $this->ilLng->txt('chatroom_image_path'),
190  'chatroom_image_path'
191  );
192  $inp->setSuffixes(['jpg', 'jpeg', 'png', 'gif', 'svg']);
193 
194  $inp->setRequired(true);
195  $this->form_gui->addItem($inp);
196 
197  $inp = new ilTextAreaInputGUI(
198  $this->ilLng->txt('chatroom_smiley_keywords'),
199  'chatroom_smiley_keywords'
200  );
201 
202  $inp->setRequired(true);
203  $inp->setUseRte(false);
204  $inp->setInfo($this->ilLng->txt('chatroom_smiley_keywords_one_per_line_note'));
205  $this->form_gui->addItem($inp);
206 
207 
208  if ($this->rbacsystem->checkAccess('write', $this->gui->getRefId())) {
209  $this->form_gui->addCommandButton(
210  'smiley-uploadSmileyObject',
211  $DIC->language()->txt('chatroom_upload_smiley')
212  );
213  }
214 
215  return $this->form_gui;
216  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSuffixes(array $a_suffixes)
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
setRequired(bool $a_required)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showDeleteSmileyFormObject()

ilChatroomAdminSmileyGUI::showDeleteSmileyFormObject ( )

Shows DeleteSmileyForm Prepares DeleteSmileyForm and displays it.

Definition at line 336 of file class.ilChatroomAdminSmileyGUI.php.

References ilChatroomGUIHandler\getRequestValue(), ilUtil\img(), and ILIAS\Repository\refinery().

336  : void
337  {
338  $this->gui->switchToVisibleMode();
339 
340  if (!$this->rbacsystem->checkAccess('write', $this->gui->getRefId())) {
341  $this->ilias->raiseError(
342  $this->ilLng->txt('msg_no_perm_write'),
343  $this->ilias->error_obj->MESSAGE
344  );
345  }
346 
347  $smileyId = $this->getRequestValue('smiley_id', $this->refinery->kindlyTo()->int());
348 
349  $smiley = ilChatroomSmilies::_getSmiley($smileyId);
350 
351  $confirmation = new ilConfirmationGUI();
352  $confirmation->setFormAction($this->ilCtrl->getFormAction($this->gui, 'smiley'));
353  $confirmation->setHeaderText($this->ilLng->txt('chatroom_confirm_delete_smiley'));
354  $confirmation->setConfirm($this->ilLng->txt('confirm'), 'smiley-deleteSmileyObject');
355  $confirmation->setCancel($this->ilLng->txt('cancel'), 'smiley');
356  $confirmation->addItem(
357  'chatroom_smiley_id',
358  (string) $smiley['smiley_id'],
359  ilUtil::img($smiley['smiley_fullpath'], $smiley['smiley_keywords']) . ' ' . $smiley['smiley_keywords']
360  );
361 
362  $this->mainTpl->setContent($confirmation->getHTML());
363  }
getRequestValue(string $key, Transformation $trafo, $default=null)
static img(string $a_src, ?string $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
header include for all ilias files.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ showEditSmileyEntryFormObject()

ilChatroomAdminSmileyGUI::showEditSmileyEntryFormObject ( )

Shows EditSmileyEntryForm Prepares EditSmileyEntryForm and displays it.

Definition at line 222 of file class.ilChatroomAdminSmileyGUI.php.

References ilChatroomGUIHandler\getRequestValue(), getSmileyFormDataById(), initSmiliesEditForm(), and ILIAS\Repository\refinery().

Referenced by deleteSmileyObject().

222  : void
223  {
224  $this->gui->switchToVisibleMode();
225 
226  if (!$this->rbacsystem->checkAccess('read', $this->gui->getRefId())) {
227  $this->ilias->raiseError(
228  $this->ilLng->txt('msg_no_perm_read'),
229  $this->ilias->error_obj->MESSAGE
230  );
231  }
232 
233  $smileyId = $this->getRequestValue('smiley_id', $this->refinery->kindlyTo()->int());
234 
235  if (null === $this->form_gui) {
236  $this->form_gui = $this->initSmiliesEditForm($this->getSmileyFormDataById($smileyId));
237  }
238 
239  $tpl_form = new ilTemplate(
240  'tpl.chatroom_edit_smilies.html',
241  true,
242  true,
243  'Modules/Chatroom'
244  );
245 
246  $tpl_form->setVariable('SMILEY_FORM', $this->form_gui->getHTML());
247 
248  $this->mainTpl->setContent($tpl_form->get());
249  }
getRequestValue(string $key, Transformation $trafo, $default=null)
header include for all ilias files.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ilChatroomAdminSmileyGUI::view ( )

Switches GUI to visible mode and calls editSmiliesObject method which prepares and displays the table of existing smilies.

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

References ilChatroom\checkUserPermissions(), and editSmiliesObject().

Referenced by confirmedDeleteMultipleObject(), and executeDefault().

42  : void
43  {
44  ilChatroom::checkUserPermissions('read', $this->gui->getRefId());
45 
46  $this->gui->switchToVisibleMode();
47 
48  self::_checkSetup();
49 
50  $this->editSmiliesObject();
51  }
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
editSmiliesObject()
Shows existing smilies table Prepares existing smilies table and displays it.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $form_gui

ilPropertyFormGUI ilChatroomAdminSmileyGUI::$form_gui = null
protected

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

Referenced by initSmiliesEditForm(), and initSmiliesForm().


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