ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilChatroomAdminSmileyGUI Class Reference

Class ilChatroomSmileyGUI 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 ($requestedMethod)
 {} More...
 
 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 ()
 Initializes smilies form and returns it. More...
 
 showEditSmileyEntryFormObject ()
 Shows EditSmileyEntryForm Prepares EditSmileyEntryForm and displays it. More...
 
 initSmiliesEditForm ($form_data)
 Initializes SmiliesEditForm and returns it. More...
 
 showDeleteSmileyFormObject ()
 Shows DeleteSmileyForm Prepares DeleteSmileyForm and displays it. More...
 
 deleteSmileyObject ()
 Deletes a smiley by $_REQUEST["chatroom_smiley_id"]. More...
 
 deleteMultipleObject ()
 Shows confirmation view for deleting multiple smilies Prepares confirmation view for deleting multiple smilies and displays it. More...
 
 confirmedDeleteMultipleObject ()
 Deletes multiple smilies by $_REQUEST["sel_ids"]. More...
 
- Public Member Functions inherited from ilChatroomGUIHandler
 __construct (ilChatroomObjectGUI $gui)
 
 sendResponse ($response)
 Sends a json encoded response and exits the php process. More...
 
 hasPermission ($permission)
 Checks for access with ilRbacSystem. More...
 
 execute ($method)
 Executes given $method if existing, otherwise executes executeDefault() method. More...
 
 executeDefault ($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...
 

Static Public Member Functions

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

Protected Member Functions

 getSmileyFormDataById ($smileyId)
 
- Protected Member Functions inherited from ilChatroomGUIHandler
 getRoomByObjectId ($objectId)
 
 exitIfNoRoomExists ($room)
 Checks if a ilChatroom exists. More...
 
 exitIfNoRoomPermission ($room, $subRoom, $chat_user)
 Check if user can moderate a chatroom. More...
 
 canModerate ($room, $subRoom, $user_id)
 Checks if the user has permission to moderate a ilChatroom. More...
 
 isMainRoom ($subRoomId)
 

Protected Attributes

 $form_gui
 
- Protected Attributes inherited from ilChatroomGUIHandler
 $gui
 
 $ilUser
 
 $ilCtrl
 
 $ilLng
 
 $webDirectory
 
 $upload
 
 $rbacsystem
 
 $mainTpl
 
 $ilias
 
 $navigationHistory
 
 $tree
 
 $tabs
 

Static Private Member Functions

static _insertDefaultValues ()
 

Detailed Description

Class ilChatroomSmileyGUI 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 12 of file class.ilChatroomAdminSmileyGUI.php.

Member Function Documentation

◆ _checkSetup()

static ilChatroomAdminSmileyGUI::_checkSetup ( )
static

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

References $DIC, $path, ilUtil\makeDirParents(), ilUtil\sendFailure(), and ilUtil\sendInfo().

45  {
46  global $DIC;
47 
48  $path = self::_getSmileyDir();
49 
50  if (!is_dir($path)) {
51  ilUtil::sendInfo($DIC->language()->txt('chat_smilies_dir_not_exists'));
53 
54  if (!is_dir($path)) {
55  ilUtil::sendFailure($DIC->language()->txt('chat_smilies_dir_not_available'));
56  return false;
57  } else {
58  $smilies = array(
59  "icon_smile.gif",
60  "icon_wink.gif",
61  "icon_laugh.gif",
62  "icon_sad.gif",
63  "icon_shocked.gif",
64  "icon_tongue.gif",
65  "icon_cool.gif",
66  "icon_eek.gif",
67  "icon_angry.gif",
68  "icon_flush.gif",
69  "icon_idea.gif",
70  "icon_thumbup.gif",
71  "icon_thumbdown.gif",
72  );
73 
74  foreach ($smilies as $smiley) {
75  copy("templates/default/images/emoticons/$smiley", $path . "/$smiley");
76  }
77 
78  self::_insertDefaultValues();
79 
80  ilUtil::sendSuccess($DIC->language()->txt('chat_smilies_initialized'));
81  }
82  }
83 
84  if (!is_writable($path)) {
85  ilUtil::sendInfo($DIC->language()->txt('chat_smilies_dir_not_writable'));
86  }
87 
88  return true;
89  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
$path
Definition: aliased.php:25
global $DIC
Definition: saml.php:7
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ _getSmileyDir()

static ilChatroomAdminSmileyGUI::_getSmileyDir (   $withBaseDir = true)
static
Parameters
bool$withBaseDir
Returns
string

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

References $path, and ilUtil\getWebspaceDir().

96  {
97  $path = 'chatroom/smilies';
98 
99  if ($withBaseDir) {
100  $path = ilUtil::getWebspaceDir() . '/' . $path;
101  }
102 
103  return $path;
104  }
$path
Definition: aliased.php:25
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ _insertDefaultValues()

static ilChatroomAdminSmileyGUI::_insertDefaultValues ( )
staticprivate

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

References $values.

107  {
108  $values = array(
109  array("icon_smile.gif", ":)\n:-)\n:smile:"),
110  array("icon_wink.gif", ";)\n;-)\n:wink:"),
111  array("icon_laugh.gif", ":D\n:-D\n:laugh:\n:grin:\n:biggrin:"),
112  array("icon_sad.gif", ":(\n:-(\n:sad:"),
113  array("icon_shocked.gif", ":o\n:-o\n:shocked:"),
114  array("icon_tongue.gif", ":p\n:-p\n:tongue:"),
115  array("icon_cool.gif", ":cool:"),
116  array("icon_eek.gif", ":eek:"),
117  array("icon_angry.gif", ":||\n:-||\n:angry:"),
118  array("icon_flush.gif", ":flush:"),
119  array("icon_idea.gif", ":idea:"),
120  array("icon_thumbup.gif", ":thumbup:"),
121  array("icon_thumbdown.gif", ":thumbdown:"),
122  );
123 
124  require_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';
125  foreach ($values as $val) {
126  ilChatroomSmilies::_storeSmiley($val[1], $val[0]);
127  }
128  }
$values

◆ confirmedDeleteMultipleObject()

ilChatroomAdminSmileyGUI::confirmedDeleteMultipleObject ( )

Deletes multiple smilies by $_REQUEST["sel_ids"].

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

References $_POST, $result, ilChatroomSmilies\_prepareKeywords(), ilChatroomSmilies\getSmiliesBasePath(), initSmiliesForm(), ILIAS\FileUpload\DTO\ProcessingStatus\OK, ilCtrl\redirect(), ilUtil\sendFailure(), ilUtil\stripSlashes(), and view().

490  {
491  if (!$this->rbacsystem->checkAccess('write', $this->gui->ref_id)) {
492  $this->ilias->raiseError(
493  $this->ilLng->txt('msg_no_perm_write'),
494  $this->ilias->error_obj->MESSAGE
495  );
496  }
497 
498  $parts = $_POST["sel_ids"];
499  if (count($parts) == 0) {
500  $this->ilCtrl->redirect($this->gui, "smiley");
501  }
502 
503  include_once "Modules/Chatroom/classes/class.ilChatroomSmilies.php";
504  ilChatroomSmilies::_deleteMultipleSmilies($parts);
505 
506  $this->ilCtrl->redirect($this->gui, "smiley");
507  }
This class provides processing control methods.
redirection script todo: (a better solution should control the processing via a xml file) ...
$_POST["username"]
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
+ 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 $s, ilCtrl\getFormAction(), ilUtil\img(), ilCtrl\redirect(), and ilUtil\sendInfo().

449  {
450  $this->gui->switchToVisibleMode();
451 
452  if (!$this->rbacsystem->checkAccess('write', $this->gui->ref_id)) {
453  $this->ilias->raiseError(
454  $this->ilLng->txt('msg_no_perm_write'),
455  $this->ilias->error_obj->MESSAGE
456  );
457  }
458 
459  $items = (array) $_REQUEST['smiley_id'];
460  if (count($items) == 0) {
461  ilUtil::sendInfo($this->ilLng->txt('select_one'), true);
462  $this->ilCtrl->redirect($this->gui, 'smiley');
463  }
464 
465  include_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';
466  $smilies = ilChatroomSmilies::_getSmiliesById($items);
467  if (count($smilies) == 0) {
468  ilUtil::sendInfo($this->ilLng->txt('select_one'), true);
469  $this->ilCtrl->redirect($this->gui, 'smiley');
470  }
471 
472  require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
473  $confirmation = new ilConfirmationGUI();
474  $confirmation->setFormAction($this->ilCtrl->getFormAction($this->gui, 'smiley'));
475  $confirmation->setHeaderText($this->ilLng->txt('chatroom_confirm_delete_smiley'));
476  $confirmation->addButton($this->ilLng->txt('confirm'), 'smiley-confirmedDeleteMultipleObject');
477  $confirmation->addButton($this->ilLng->txt('cancel'), 'smiley');
478 
479  foreach ($smilies as $s) {
480  $confirmation->addItem('sel_ids[]', $s['smiley_id'], ilUtil::img($s['smiley_fullpath'], $s['smiley_keywords']) . ' ' . $s['smiley_keywords']);
481  }
482 
483  $this->mainTpl->setContent($confirmation->getHTML());
484  }
This class provides processing control methods.
$s
Definition: pwgen.php:45
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
Confirmation screen class.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
+ Here is the call graph for this function:

◆ deleteSmileyObject()

ilChatroomAdminSmileyGUI::deleteSmileyObject ( )

Deletes a smiley by $_REQUEST["chatroom_smiley_id"].

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

References $data, $result, ilChatroomSmilies\_prepareKeywords(), getSmileyFormDataById(), ilChatroomSmilies\getSmiliesBasePath(), initSmiliesEditForm(), ILIAS\FileUpload\DTO\ProcessingStatus\OK, ilCtrl\redirect(), ilUtil\sendFailure(), showEditSmileyEntryFormObject(), and ilUtil\stripSlashes().

368  {
369  if (!$this->rbacsystem->checkAccess('write', $this->gui->ref_id)) {
370  $this->ilias->raiseError(
371  $this->ilLng->txt('msg_no_perm_write'),
372  $this->ilias->error_obj->MESSAGE
373  );
374  }
375 
376  include_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';
377 
378  ilChatroomSmilies::_deleteSmiley($_REQUEST["chatroom_smiley_id"]);
379 
380  $this->ilCtrl->redirect($this->gui, "smiley");
381  }
This class provides processing control methods.
redirection script todo: (a better solution should control the processing via a xml file) ...
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
+ 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 134 of file class.ilChatroomAdminSmileyGUI.php.

References $form, $form_gui, $table, ilChatroomSmiliesGUI\_getExistingSmiliesTable(), and initSmiliesForm().

Referenced by view().

135  {
136  if (!$this->rbacsystem->checkAccess('read', $this->gui->ref_id)) {
137  $this->ilias->raiseError(
138  $this->ilLng->txt('msg_no_perm_read'),
139  $this->gui->ilias->error_obj->MESSAGE
140  );
141  }
142 
143  include_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';
144 
145  ilChatroomSmilies::_checkSetup();
146 
147  if (!$this->form_gui) {
148  $form = $this->initSmiliesForm();
149  } else {
151  }
152 
153  include_once "Modules/Chatroom/classes/class.ilChatroomSmiliesGUI.php";
154 
156 
157  $tpl_smilies = new ilTemplate(
158  "tpl.chatroom_edit_smilies.html",
159  true,
160  true,
161  "Modules/Chatroom"
162  );
163  $tpl_smilies->setVariable("SMILEY_TABLE", $table);
164  $tpl_smilies->setVariable("SMILEY_FORM", $form->getHtml());
165 
166  $this->mainTpl->setContent($tpl_smilies->get());
167  }
static _getExistingSmiliesTable($a_ref)
Constructor public.
initSmiliesForm()
Initializes smilies form and returns it.
if(isset($_POST['submit'])) $form
special template class to simplify handling of ITX/PEAR
redirection script todo: (a better solution should control the processing via a xml file) ...
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeDefault()

ilChatroomAdminSmileyGUI::executeDefault (   $requestedMethod)

{}

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

References view().

23  {
24  $this->view();
25  }
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 (   $smileyId)
protected
Parameters
$smileyId
Returns
array
Exceptions

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

Referenced by deleteSmileyObject(), and showEditSmileyEntryFormObject().

255  {
256  require_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';
257  $smiley = ilChatroomSmilies::_getSmiley($smileyId);
258 
259  $form_data = array(
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 
265  return $form_data;
266  }
+ Here is the caller graph for this function:

◆ initSmiliesEditForm()

ilChatroomAdminSmileyGUI::initSmiliesEditForm (   $form_data)

Initializes SmiliesEditForm and returns it.

Returns
ilPropertyFormGUI

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

References $form_gui, ilCtrl\getFormAction(), ilCtrl\saveParameter(), ilFileInputGUI\setSuffixes(), ilChatroomSmiliesCurrentSmileyFormElement\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by deleteSmileyObject(), and showEditSmileyEntryFormObject().

273  {
274  include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
275 
276  $this->form_gui = new ilPropertyFormGUI();
277 
278  $this->form_gui->setValuesByArray($form_data);
279 
280  $table_nav = $_REQUEST["_table_nav"] ? "&_table_nav=" . $_REQUEST["_table_nav"] : "";
281 
282  $this->ilCtrl->saveParameter($this->gui, 'smiley_id');
283 
284  $this->form_gui->setFormAction(
285  $this->ilCtrl->getFormAction($this->gui, 'smiley-updateSmiliesObject') . $table_nav
286  );
287 
288  $sec_l = new ilFormSectionHeaderGUI();
289 
290  $sec_l->setTitle($this->ilLng->txt('chatroom_edit_smiley'));
291  $this->form_gui->addItem($sec_l);
292 
293  include_once "Modules/Chatroom/classes/class.ilChatroomSmiliesCurrentSmileyFormElement.php";
294 
296  $this->ilLng->txt('chatroom_current_smiley_image_path'),
297  'chatroom_current_smiley_image_path'
298  );
299 
300  $inp->setValue($form_data['chatroom_current_smiley_image_path']);
301  $this->form_gui->addItem($inp);
302 
303  $inp = new ilImageFileInputGUI(
304  $this->ilLng->txt('chatroom_image_path'),
305  'chatroom_image_path'
306  );
307  $inp->setSuffixes(array("jpg", "jpeg", "png", "gif", "svg"));
308 
309  $inp->setRequired(false);
310  $inp->setInfo($this->ilLng->txt('chatroom_smiley_image_only_if_changed'));
311  $this->form_gui->addItem($inp);
312 
313  $inp = new ilTextAreaInputGUI(
314  $this->ilLng->txt('chatroom_smiley_keywords'),
315  'chatroom_smiley_keywords'
316  );
317 
318  $inp->setValue($form_data['chatroom_smiley_keywords']);
319  $inp->setUseRte(false);
320  $inp->setRequired(true);
321  $inp->setInfo($this->ilLng->txt('chatroom_smiley_keywords_one_per_line_note'));
322  $this->form_gui->addItem($inp);
323 
324  $inp = new ilHiddenInputGUI('chatroom_smiley_id');
325 
326  $this->form_gui->addItem($inp);
327  $this->form_gui->addCommandButton(
328  'smiley-updateSmiliesObject',
329  $this->ilLng->txt('submit')
330  );
331  $this->form_gui->addCommandButton('smiley', $this->ilLng->txt('cancel'));
332  return $this->form_gui;
333  }
This class provides processing control methods.
This class represents a property form user interface.
This class represents a section header in a property form.
setValue($a_value)
Set Value.
setValue($a_value)
Sets given value as $this->value in ilChatroomSmiliesCurrentSmileyFormElement.
This class represents a hidden form property in a property form.
Class ilChatroomSmiliesCurrentSmileyFormElement Class ilchatroomSmiliesCurrentSmileyFormElement simpl...
saveParameter($a_obj, $a_parameter)
Set parameters that should be passed in every form and link of a gui class.
This class represents an image file property in a property form.
This class represents a text area property in a property form.
setSuffixes($a_suffixes)
Set Accepted Suffixes.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSmiliesForm()

ilChatroomAdminSmileyGUI::initSmiliesForm ( )

Initializes smilies form and returns it.

Returns
ilPropertyFormGUI

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

References $form_gui, ilCtrl\getFormAction(), ilFormPropertyGUI\setRequired(), and ilFileInputGUI\setSuffixes().

Referenced by confirmedDeleteMultipleObject(), and editSmiliesObject().

174  {
175  include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
176 
177  $this->form_gui = new ilPropertyFormGUI();
178 
179  $table_nav = $_REQUEST["_table_nav"] ? "&_table_nav=" . $_REQUEST["_table_nav"] : "";
180  $this->form_gui->setFormAction(
181  $this->ilCtrl->getFormAction($this->gui, 'smiley-uploadSmileyObject') . $table_nav
182  );
183 
184  // chat server settings
185  $sec_l = new ilFormSectionHeaderGUI();
186 
187  $sec_l->setTitle($this->ilLng->txt('chatroom_add_smiley'));
188  $this->form_gui->addItem($sec_l);
189 
190  $inp = new ilImageFileInputGUI(
191  $this->ilLng->txt('chatroom_image_path'),
192  'chatroom_image_path'
193  );
194  $inp->setSuffixes(array("jpg", "jpeg", "png", "gif", "svg"));
195 
196  $inp->setRequired(true);
197  $this->form_gui->addItem($inp);
198 
199  $inp = new ilTextAreaInputGUI(
200  $this->ilLng->txt('chatroom_smiley_keywords'),
201  'chatroom_smiley_keywords'
202  );
203 
204  $inp->setRequired(true);
205  $inp->setUseRte(false);
206  $inp->setInfo($this->ilLng->txt('chatroom_smiley_keywords_one_per_line_note'));
207  $this->form_gui->addItem($inp);
208  $this->form_gui->addCommandButton(
209  'smiley-uploadSmileyObject',
210  $this->ilLng->txt('chatroom_upload_smiley')
211  );
212 
213  return $this->form_gui;
214  }
This class provides processing control methods.
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents an image file property in a property form.
This class represents a text area property in a property form.
setSuffixes($a_suffixes)
Set Accepted Suffixes.
setRequired($a_required)
Set Required.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
+ 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 339 of file class.ilChatroomAdminSmileyGUI.php.

References ilCtrl\getFormAction(), and ilUtil\img().

340  {
341  $this->gui->switchToVisibleMode();
342 
343  if (!$this->rbacsystem->checkAccess('write', $this->gui->ref_id)) {
344  $this->ilias->raiseError(
345  $this->ilLng->txt('msg_no_perm_write'),
346  $this->ilias->error_obj->MESSAGE
347  );
348  }
349 
350  include_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';
351  $smiley = ilChatroomSmilies::_getSmiley((int) $_REQUEST['smiley_id']);
352 
353  require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
354  $confirmation = new ilConfirmationGUI();
355  $confirmation->setFormAction($this->ilCtrl->getFormAction($this->gui, 'smiley'));
356  $confirmation->setHeaderText($this->ilLng->txt('chatroom_confirm_delete_smiley'));
357  $confirmation->addButton($this->ilLng->txt('confirm'), 'smiley-deleteSmileyObject');
358  $confirmation->addButton($this->ilLng->txt('cancel'), 'smiley');
359  $confirmation->addItem('chatroom_smiley_id', $smiley['smiley_id'], ilUtil::img($smiley['smiley_fullpath'], $smiley['smiley_keywords']) . ' ' . $smiley['smiley_keywords']);
360 
361  $this->mainTpl->setContent($confirmation->getHTML());
362  }
This class provides processing control methods.
redirection script todo: (a better solution should control the processing via a xml file) ...
static img($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
Confirmation screen class.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
+ Here is the call graph for this function:

◆ showEditSmileyEntryFormObject()

ilChatroomAdminSmileyGUI::showEditSmileyEntryFormObject ( )

Shows EditSmileyEntryForm Prepares EditSmileyEntryForm and displays it.

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

References $form, $form_gui, getSmileyFormDataById(), and initSmiliesEditForm().

Referenced by deleteSmileyObject().

221  {
222  $this->gui->switchToVisibleMode();
223 
224  if (!$this->rbacsystem->checkAccess('read', $this->gui->ref_id)) {
225  $this->ilias->raiseError(
226  $this->ilLng->txt('msg_no_perm_read'),
227  $this->ilias->error_obj->MESSAGE
228  );
229  }
230 
231  if (!$this->form_gui) {
232  $form = $this->initSmiliesEditForm($this->getSmileyFormDataById((int) $_REQUEST['smiley_id']));
233  } else {
235  }
236 
237  $tpl_form = new ilTemplate(
238  "tpl.chatroom_edit_smilies.html",
239  true,
240  true,
241  "Modules/Chatroom"
242  );
243 
244  $tpl_form->setVariable("SMILEY_FORM", $form->getHTML());
245 
246  $this->mainTpl->setContent($tpl_form->get());
247  }
initSmiliesEditForm($form_data)
Initializes SmiliesEditForm and returns it.
if(isset($_POST['submit'])) $form
special template class to simplify handling of ITX/PEAR
redirection script todo: (a better solution should control the processing via a xml file) ...
+ 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 31 of file class.ilChatroomAdminSmileyGUI.php.

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

Referenced by confirmedDeleteMultipleObject(), and executeDefault().

32  {
33  include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
34 
35  ilChatroom::checkUserPermissions('read', $this->gui->ref_id);
36 
37  $this->gui->switchToVisibleMode();
38 
39  self::_checkSetup();
40 
41  $this->editSmiliesObject();
42  }
static checkUserPermissions($permissions, $ref_id, $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

ilChatroomAdminSmileyGUI::$form_gui
protected

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