ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilObjChatroomGUI Class Reference

ilObjChatroomGUI: ilMDEditorGUI, ilInfoScreenGUI, ilPermissionGUI, ilObjectCopyGUI ilObjChatroomGUI: ilExportGUI, ilCommonActionDispatcherGUI, ilPropertyFormGUI, ilExportGUI More...

+ Inheritance diagram for ilObjChatroomGUI:
+ Collaboration diagram for ilObjChatroomGUI:

Public Member Functions

 __construct ($data=null, ?int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 getUnsafeGetCommands ()
 This method must return a list of unsafe GET commands. More...
 
 getSafePostCommands ()
 This method must return a list of safe POST commands. More...
 
 executeCommand ()
 
 getConnector ()
 
 fallback ()
 
 settings ()
 
- Public Member Functions inherited from ilChatroomObjectGUI
 getConnector ()
 
 switchToVisibleMode ()
 Calls $this->prepareOutput() method. More...
 
 getAdminTabs ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto ($params)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 getObjectDefinition ()
 
 addLocatorItems ()
 
 createActionDispatcherGUI ()
 
 infoScreen ()
 
 afterImport (ilObject $new_object)
 
 afterSave (ilObject $new_object)
 
- Protected Member Functions inherited from ilChatroomObjectGUI
 dispatchCall (string $gui, string $method)
 
 getObjectDefinition ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjChatroomGUI::__construct (   $data = null,
?int  $id = 0,
bool  $call_by_reference = true,
bool  $prepare_output = true 
)

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

References ilObjectGUI\$call_by_reference, ilObjectGUI\$data, ilObjectGUI\$id, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

32  {
33  $this->type = 'chtr';
35  $this->lng->loadLanguageModule('chatroom');
36  $this->lng->loadLanguageModule('chatroom_adm');
37  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjChatroomGUI::_goto (   $params)
static

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

References $DIC, $params, $parts, ilObjectGUI\$ref_id, ilObjectGUI\_gotoRepositoryNode(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChatroom\checkUserPermissions(), ILIAS\Repository\int(), and ROOT_FOLDER_ID.

39  : void
40  {
41  global $DIC;
42  $main_tpl = $DIC->ui()->mainTemplate();
43 
44  $parts = array_filter(explode('_', (string) $params));
45  $ref_id = (int) $parts[0];
46  $sub = (int) ($parts[1] ?? 0);
47 
48  if (ilChatroom::checkUserPermissions('read', $ref_id, false)) {
49  if ($sub) {
50  $DIC->ctrl()->setParameterByClass(self::class, 'sub', $sub);
51  }
52 
53  $DIC->ctrl()->setParameterByClass(self::class, 'ref_id', $ref_id);
54  $DIC->ctrl()->redirectByClass(
55  [
56  ilRepositoryGUI::class,
57  self::class,
58  ],
59  'view'
60  );
61  } elseif (ilChatroom::checkUserPermissions('visible', $ref_id, false)) {
62  $DIC->ctrl()->setParameterByClass(ilInfoScreenGUI::class, 'ref_id', $ref_id);
63  $DIC->ctrl()->redirectByClass(
64  [
65  ilRepositoryGUI::class,
66  self::class,
67  ilInfoScreenGUI::class
68  ],
69  'info'
70  );
71  } elseif ($DIC->rbac()->system()->checkAccess('read', ROOT_FOLDER_ID)) {
72  $main_tpl->setOnScreenMessage('info', sprintf(
73  $DIC->language()->txt('msg_no_perm_read_item'),
75  ), true);
77  }
78 
79  $DIC['ilErr']->raiseError(
80  sprintf(
81  $DIC->language()->txt('msg_no_perm_read_item'),
83  ),
84  $DIC['ilErr']->FATAL
85  );
86  }
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
const ROOT_FOLDER_ID
Definition: constants.php:32
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjChatroomGUI::addLocatorItems ( )
protected

Definition at line 93 of file class.ilObjChatroomGUI.php.

References ILIAS\Repository\ctrl(), getRefId(), ILIAS\Repository\locator(), and ILIAS\Repository\object().

93  : void
94  {
95  if (is_object($this->object)) {
96  $this->locator->addItem(
97  $this->object->getTitle(),
98  $this->ctrl->getLinkTarget($this, 'view'),
99  '',
100  $this->getRefId()
101  );
102  }
103  }
+ Here is the call graph for this function:

◆ afterImport()

ilObjChatroomGUI::afterImport ( ilObject  $new_object)
protected

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

References $response, ilChatroom\byObjectId(), getConnector(), ilObject\getId(), ilObject\getOwner(), and ilObject\getTitle().

292  : void
293  {
294  $room = ilChatroom::byObjectId($new_object->getId());
295  $connector = $this->getConnector();
296  $response = $connector->sendCreatePrivateRoom($room->getRoomId(), $new_object->getOwner(), $new_object->getTitle());
297 
298  parent::afterImport($new_object);
299  }
$response
Definition: xapitoken.php:93
static byObjectId(int $object_id)
+ Here is the call graph for this function:

◆ afterSave()

ilObjChatroomGUI::afterSave ( ilObject  $new_object)
protected

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

References $response, ILIAS\Repository\ctrl(), getConnector(), ilObject\getId(), ilObject\getOwner(), ilObject\getRefId(), ilObject\getTitle(), and ILIAS\Repository\lng().

301  : void
302  {
303  $room = new ilChatroom();
304  $room->saveSettings([
305  'object_id' => $new_object->getId(),
306  'autogen_usernames' => 'Autogen #',
307  'display_past_msgs' => 100,
308  ]);
309 
310  $connector = $this->getConnector();
311  $response = $connector->sendCreatePrivateRoom(
312  $room->getRoomId(),
313  $new_object->getOwner(),
314  $new_object->getTitle()
315  );
316 
317  $this->tpl->setOnScreenMessage('success', $this->lng->txt('object_added'), true);
318  $this->ctrl->setParameter($this, 'ref_id', $new_object->getRefId());
319  $this->ctrl->redirect($this, 'settings-general');
320  }
$response
Definition: xapitoken.php:93
+ Here is the call graph for this function:

◆ createActionDispatcherGUI()

ilObjChatroomGUI::createActionDispatcherGUI ( )
protected

Definition at line 240 of file class.ilObjChatroomGUI.php.

References $DIC, ilObjectGUI\$ref_id, ILIAS\Repository\object(), and ilCommonActionDispatcherGUI\TYPE_REPOSITORY.

241  {
242  global $DIC;
243 
244  return new ilCommonActionDispatcherGUI(
246  new AccessBridge($DIC->rbac()->system()),
247  $this->object->getType(),
249  $this->object->getId()
250  );
251  }
global $DIC
Definition: shib_login.php:26
Class ilCommonActionDispatcherGUI.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjChatroomGUI::executeCommand ( )

Definition at line 123 of file class.ilObjChatroomGUI.php.

References $DIC, Vendor\Package\$e, $GLOBALS, $refId, $res, ilObjectGUI\addHeaderAction(), ilObjectGUI\cancelCreation(), ilChatroom\checkPermissionsOfUser(), ILIAS\Repository\ctrl(), ilChatroomObjectGUI\dispatchCall(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ILIAS\FileDelivery\http(), infoScreen(), null, ilObjectGUI\prepareOutput(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

123  : void
124  {
125  global $DIC;
126 
127  if ('cancel' === $this->ctrl->getCmd() && $this->getCreationMode()) {
128  $this->cancelCreation();
129  return;
130  }
131 
132  $refId = $this->http->wrapper()->query()->retrieve('ref_id', $this->refinery->kindlyTo()->int());
133  if (!$this->getCreationMode() && ilChatroom::checkPermissionsOfUser($this->user->getId(), 'read', $refId)) {
134  $DIC['ilNavigationHistory']->addItem(
135  $refId,
136  './goto.php?target=' . $this->type . '_' . $refId,
137  $this->type
138  );
139  }
140 
141  $next_class = $this->ctrl->getNextClass() ?? '';
142 
143  $tabFactory = null;
144  if (!$this->getCreationMode()) {
145  $tabFactory = new ilChatroomTabGUIFactory($this);
146 
147  $baseClass = $this->http->wrapper()->query()->retrieve(
148  'baseClass',
149  $this->refinery->byTrying([
150  $this->refinery->kindlyTo()->string(),
151  $this->refinery->always('')
152  ])
153  );
154  if (strtolower($baseClass) === strtolower(ilAdministrationGUI::class)) {
155  $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
156  } else {
157  $DIC['ilHelp']->setScreenIdComponent('chtr');
158  $tabFactory->getTabsForCommand($this->ctrl->getCmd());
159  }
160  }
161 
162  switch (strtolower($next_class)) {
163  case strtolower(ilInfoScreenGUI::class):
164  $this->infoScreen();
165  break;
166 
167  case strtolower(ilPropertyFormGUI::class):
168  $factory = new ilChatroomFormFactory();
169  $form = $factory->getClientSettingsForm();
170  $this->ctrl->forwardCommand($form);
171  break;
172 
173  case strtolower(ilPermissionGUI::class):
174  $this->prepareOutput();
175  $perm_gui = new ilPermissionGUI($this);
176  $this->ctrl->forwardCommand($perm_gui);
177  break;
178 
179  case strtolower(ilExportGUI::class):
180  $this->prepareOutput();
181 
182  $GLOBALS['DIC']->tabs()->setTabActive('export');
183 
184  $exp = new ilExportGUI($this);
185  $this->ctrl->forwardCommand($exp);
186  break;
187 
188  case strtolower(ilObjectCopyGUI::class):
189  $this->prepareOutput();
190  $cp = new ilObjectCopyGUI($this);
191  $cp->setType('chtr');
192  $this->ctrl->forwardCommand($cp);
193  break;
194 
195  case strtolower(ilCommonActionDispatcherGUI::class):
196  $this->prepareOutput();
198  $this->ctrl->forwardCommand($gui);
199  break;
200 
201  default:
202  try {
203  $res = explode('-', (string) $this->ctrl->getCmd(''), 2);
204  $result = $this->dispatchCall($res[0], $res[1] ?? '');
205  if (!$result && method_exists($this, $this->ctrl->getCmd() . 'Object')) {
206  $this->prepareOutput();
207  $this->{$this->ctrl->getCmd() . 'Object'}();
208  }
209  } catch (Exception $e) {
210  if ($this->ctrl->isAsynch()) {
211  $responseStream = Streams::ofString(json_encode([
212  'success' => false,
213  'reason' => $e->getMessage()
214  ], JSON_THROW_ON_ERROR));
215  $this->http->saveResponse(
216  $this->http->response()
217  ->withBody($responseStream)
218  ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
219  );
220  $this->http->sendResponse();
221  $this->http->close();
222  } else {
223  throw $e;
224  }
225  }
226  break;
227  }
228 
229  if ($this->object?->getType() !== 'chta') {
230  $this->addHeaderAction();
231  }
232 
233  if ($tabFactory !== null &&
234  $tabFactory->getActivatedTab() !== null &&
235  $this->tabs_gui->getActiveTab() !== $tabFactory->getActivatedTab()) {
236  $this->tabs_gui->activateTab($tabFactory->getActivatedTab());
237  }
238  }
$res
Definition: ltiservices.php:66
cancelCreation()
cancel create action and go back to repository parent
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
$refId
Definition: xapitoken.php:58
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
$GLOBALS["DIC"]
Definition: wac.php:53
static checkPermissionsOfUser(int $usr_id, $permissions, int $ref_id)
Checks user permissions in question for a given user id in relation to a given ref_id.
global $DIC
Definition: shib_login.php:26
dispatchCall(string $gui, string $method)
Class ilChatroomTabGUIFactory.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ fallback()

ilObjChatroomGUI::fallback ( )

Definition at line 281 of file class.ilObjChatroomGUI.php.

References ILIAS\Repository\lng(), and ilObjectGUI\prepareOutput().

281  : void
282  {
283  $this->prepareOutput();
284  $this->tpl->setVariable('ADM_CONTENT', $this->lng->txt('invalid_operation'));
285  }
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

◆ getConnector()

ilObjChatroomGUI::getConnector ( )

Definition at line 276 of file class.ilObjChatroomGUI.php.

References ilChatroomAdmin\getDefaultConfiguration().

Referenced by afterImport(), and afterSave().

277  {
278  return new ilChatroomServerConnector(ilChatroomAdmin::getDefaultConfiguration()->getServerSettings());
279  }
static getDefaultConfiguration()
Instantiates and returns ilChatroomAdmin object using instance_id and settings from settingsTable...
Class ilChatroomServerConnector.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjectDefinition()

ilObjChatroomGUI::getObjectDefinition ( )
protected

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

References ilChatroomObjectDefinition\getDefaultDefinition().

89  {
91  }
static getDefaultDefinition(string $moduleName)
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.
+ Here is the call graph for this function:

◆ getRefId()

ilObjChatroomGUI::getRefId ( )

Definition at line 105 of file class.ilObjChatroomGUI.php.

Referenced by addLocatorItems().

105  : int
106  {
107  return $this->object->getRefId();
108  }
+ Here is the caller graph for this function:

◆ getSafePostCommands()

ilObjChatroomGUI::getSafePostCommands ( )

This method must return a list of safe POST commands.

Safe post commands returned by this method will no longer be CSRF protected and will NOT be appended by an ilCtrlToken.

Returns
string[]

Implements ilCtrlSecurityInterface.

Definition at line 115 of file class.ilObjChatroomGUI.php.

115  : array
116  {
117  return [
118  'view-toggleAutoMessageDisplayState',
119  'ban-handleTableActions',
120  ];
121  }

◆ getUnsafeGetCommands()

ilObjChatroomGUI::getUnsafeGetCommands ( )

This method must return a list of unsafe GET commands.

Unsafe get commands returned by this method will now be CSRF protected, which means an ilCtrlToken is appended each time a link-target is generated to the class implementing this interface with a command from that list.

Tokens will be validated in

See also
ilCtrlInterface::getCmd(), whereas the fallback command will be used if the CSRF validation fails.
Returns
string[]

Implements ilCtrlSecurityInterface.

Definition at line 110 of file class.ilObjChatroomGUI.php.

110  : array
111  {
112  return [];
113  }

◆ infoScreen()

ilObjChatroomGUI::infoScreen ( )
protected

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

References $info, $refId, ilChatroom\checkUserPermissions(), ILIAS\Repository\ctrl(), ilObjectGUI\prepareOutput(), and ILIAS\Repository\refinery().

Referenced by executeCommand().

253  : void
254  {
255  if (strtolower($this->ctrl->getCmd() ?? '') === 'info') {
256  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, 'showSummary');
257  }
258 
259  $this->prepareOutput();
260 
261  $info = new ilInfoScreenGUI($this);
262 
263  $info->enablePrivateNotes();
264 
265  $refId = $this->request_wrapper->retrieve(
266  'ref_id',
267  $this->refinery->kindlyTo()->int()
268  );
269  if (ilChatroom::checkUserPermissions('read', $refId, false)) {
270  $info->enableNews();
271  }
272 
273  $this->ctrl->forwardCommand($info);
274  }
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
prepareOutput(bool $show_sub_objects=true)
$refId
Definition: xapitoken.php:58
$info
Definition: entry_point.php:21
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settings()

ilObjChatroomGUI::settings ( )

Definition at line 287 of file class.ilObjChatroomGUI.php.

References ilObjectGUI\prepareOutput().

287  : void
288  {
289  $this->prepareOutput();
290  }
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

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