ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilChatroomInfoGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
13
20 {
21 parent::__construct($gui);
22 require_once 'Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
23 }
24
31 public function executeDefault($method)
32 {
38 global $rbacsystem, $ilCtrl, $lng;
39
40 include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
41
42 $this->redirectIfNoPermission('read');
43
44 $this->gui->switchToVisibleMode();
45
46 if (!ilChatroom::checkUserPermissions("visible", $this->gui->ref_id, false)) {
47 $this->gui->ilias->raiseError(
48 $lng->txt("msg_no_perm_read"),
49 $this->ilias->error_obj->MESSAGE
50 );
51 }
52
53 $info = $this->createInfoScreenGUI($this->gui);
54
55 $info->enablePrivateNotes();
56
57 if (ilChatroom::checkUserPermissions("read", (int) $_GET["ref_id"], false)) {
58 $info->enableNews();
59 }
60
61 $info->addMetaDataSections(
62 $this->gui->object->getId(),
63 0,
64 $this->gui->object->getType()
65 );
66 if (!$method) {
67 $ilCtrl->setCmd('showSummary');
68 } else {
69 $ilCtrl->setCmd($method);
70 }
71 $ilCtrl->forwardCommand($info);
72 }
73
78 protected function createInfoScreenGUI($gui)
79 {
80 return new ilInfoScreenGUI($gui);
81 }
82}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomGUIHandler.
executeDefault($requestedMethod)
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
Class ilChatroomInfoGUI Provides methods to prepare and display the info task.
__construct(ilChatroomObjectGUI $gui)
Constructor Requires ilInfoScreenGUI and sets $this->gui using given $gui.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
Class ilInfoScreenGUI.
$info
Definition: index.php:5
global $lng
Definition: privfeed.php:17