ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilChatroomInfoGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
29 {
31  {
32  return new ilInfoScreenGUI($gui);
33  }
34 
35  public function executeDefault(string $requestedMethod): void
36  {
37  $this->redirectIfNoPermission('visible');
38 
39  $this->gui->switchToVisibleMode();
40 
41  $info = $this->createInfoScreenGUI($this->gui);
42 
43  $info->enablePrivateNotes();
44 
45  $refId = $this->getRequestValue('ref_id', $this->refinery->kindlyTo()->int());
46  if (ilChatroom::checkUserPermissions('read', $refId, false)) {
47  $info->enableNews();
48  }
49 
50  $info->addMetaDataSections(
51  $this->gui->getObject()->getId(),
52  0,
53  $this->gui->getObject()->getType()
54  );
55  if ($requestedMethod === '') {
56  $this->ilCtrl->setCmd('showSummary');
57  } else {
58  $this->ilCtrl->setCmd($requestedMethod);
59  }
60  $this->ilCtrl->forwardCommand($info);
61  }
62 }
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
Class ilInfoScreenGUI.
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
getRequestValue(string $key, Transformation $trafo, $default=null)
createInfoScreenGUI(ilChatroomObjectGUI $gui)
$refId
Definition: xapitoken.php:58
executeDefault(string $requestedMethod)
Class ilChatroomGUIHandler.
Class ilChatroomInfoGUI Provides methods to prepare and display the info task.