ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjChatroomGUI Class Reference

Class ilObjChatroomGUI GUI class for chatroom objects. More...

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

Public Member Functions

 __construct ($a_data=null, $a_id=null, $a_call_by_reference=true)
 {} More...
 
 getRefId ()
 Returns RefId. More...
 
 _forwards ()
 Returns an empty array. More...
 
 executeCommand ()
 {} More...
 
 getConnector ()
 
 fallback ()
 Calls $this->prepareOutput method and sets template variable. More...
 
 settings ()
 Calls prepareOutput method. More...
 
- Public Member Functions inherited from ilChatroomObjectGUI
 getConnector ()
 
 switchToVisibleMode ()
 Calls $this->prepareOutput() method. More...
 
 getAdminTabs ()
 {} More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _goto ($params)
 Overwrites $_GET['ref_id'] with given $ref_id. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 getObjectDefinition ()
 Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition. More...
 
 initCreationForms ($a_new_type)
 {} More...
 
 addLocatorItems ()
 
- Protected Member Functions inherited from ilChatroomObjectGUI
 getObjectDefinition ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Detailed Description

Class ilObjChatroomGUI GUI class for chatroom objects.

Author
Jan Posselt <jposselt at databay.de>
Version
$Id$ ilObjChatroomGUI: ilMDEditorGUI, ilInfoScreenGUI, ilPermissionGUI, ilObjectCopyGUI ilObjChatroomGUI: ilExportGUI, ilCommonActionDispatcherGUI, ilPropertyFormGUI, ilExportGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilObjChatroomGUI::__construct (   $a_data = null,
  $a_id = null,
  $a_call_by_reference = true 
)

{}

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

References $_GET, ILIAS\GlobalScreen\Provider\__construct(), and exit.

25  {
26  if (in_array($_REQUEST['cmd'], array('getOSDNotifications', 'removeOSDNotifications'))) {
27  require_once 'Services/Notifications/classes/class.ilNotificationGUI.php';
28  $notifications = new ilNotificationGUI();
29  $notifications->{$_REQUEST['cmd'] . 'Object'}();
30  exit;
31  }
32 
33  if ($a_data == null) {
34  if ($_GET['serverInquiry']) {
35  require_once dirname(__FILE__) . '/class.ilChatroomServerHandler.php';
37  return;
38  }
39  }
40 
41  $this->type = 'chtr';
42  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
43  $this->lng->loadLanguageModule('chatroom');
44  $this->lng->loadLanguageModule('chatroom_adm');
45  }
exit
Definition: login.php:29
Class ilChatroomServerHandler.
$_GET["client_id"]
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _forwards()

ilObjChatroomGUI::_forwards ( )

Returns an empty array.

Returns
array

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

128  {
129  return array();
130  }

◆ _goto()

static ilObjChatroomGUI::_goto (   $params)
static

Overwrites $_GET['ref_id'] with given $ref_id.

Parameters
string$params

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

References $_GET, $DIC, ilObjectGUI\$ref_id, ilObjectGUI\_gotoRepositoryNode(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChatroom\checkUserPermissions(), and ilUtil\sendInfo().

52  {
53  global $DIC;
54 
55  $parts = explode('_', $params);
56  $ref_id = $parts[0];
57  $sub = $parts[1];
58 
59  if (ilChatroom::checkUserPermissions('read', $ref_id, false)) {
60  if ($sub) {
61  $_REQUEST['sub'] = $_GET['sub'] = (int) $sub;
62  }
64  } elseif (ilChatroom::checkUserPermissions('visible', $ref_id, false)) {
65  $DIC->ctrl()->setParameterByClass(ilInfoScreenGUI::class, 'ref_id', $ref_id);
66  $DIC->ctrl()->redirectByClass(
67  [
68  ilRepositoryGUI::class,
69  ilObjChatroomGUI::class,
70  ilInfoScreenGUI::class
71  ],
72  'info'
73  );
74  } elseif ($DIC->rbac()->system()->checkAccess('read', ROOT_FOLDER_ID)) {
75  ilUtil::sendInfo(sprintf($DIC->language()->txt('msg_no_perm_read_item'), ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id))), true);
76  ilObjectGUI::_gotoRepositoryNode(ROOT_FOLDER_ID, '');
77  }
78 
79  $DIC['ilErr']->raiseError(sprintf($DIC->language()->txt('msg_no_perm_read_item'), ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id))), $DIC['ilErr']->FATAL);
80  }
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjChatroomGUI::addLocatorItems ( )
protected

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

References $DIC, and getRefId().

106  {
107  global $DIC;
108 
109  if (is_object($this->object)) {
110  $DIC['ilLocator']->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 'view'), '', $this->getRefId());
111  }
112  }
getRefId()
Returns RefId.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ executeCommand()

ilObjChatroomGUI::executeCommand ( )

{}

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

References $_GET, $DIC, Vendor\Package\$e, $factory, $GLOBALS, $res, $result, exit, ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), and ilObjectGUI\prepareOutput().

136  {
137  global $DIC;
138 
139  if ('cancel' == $this->ctrl->getCmd() && $this->getCreationMode()) {
140  parent::cancelCreation();
141  return;
142  }
143 
144  // add entry to navigation history
145  if (!$this->getCreationMode() && $DIC->access()->checkAccess('read', '', (int) $_GET['ref_id'])) {
146  $DIC['ilNavigationHistory']->addItem($_GET['ref_id'], './goto.php?target=' . $this->type . '_' . $_GET['ref_id'], $this->type);
147  }
148 
149  $next_class = $this->ctrl->getNextClass();
150 
151  require_once 'Modules/Chatroom/classes/class.ilChatroomTabGUIFactory.php';
152  if (!$this->getCreationMode()) {
153  $tabFactory = new ilChatroomTabGUIFactory($this);
154 
155  if (strtolower($_GET['baseClass']) == 'iladministrationgui') {
156  $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
157  } else {
158  $DIC['ilHelp']->setScreenIdComponent("chtr");
159  $tabFactory->getTabsForCommand($this->ctrl->getCmd());
160  }
161  }
162 
163  // #8701 - infoscreen actions
164  if ($next_class == 'ilinfoscreengui' && $this->ctrl->getCmd() != 'info') {
165  $this->ctrl->setCmd('info-' . $this->ctrl->getCmd());
166  }
167  // repository info call
168  if ($this->ctrl->getCmd() == 'infoScreen') {
169  $this->ctrl->setCmdClass('ilinfoscreengui');
170  $this->ctrl->setCmd('info');
171  }
172 
173  switch ($next_class) {
174  case "ilpropertyformgui":
175  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
176 
177  require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
179  $form = $factory->getClientSettingsForm();
180 
181  $this->ctrl->forwardCommand($form);
182  break;
183  case 'ilpermissiongui':
184  include_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
185  $this->prepareOutput();
186  $perm_gui = new ilPermissionGUI($this);
187  $this->ctrl->forwardCommand($perm_gui);
188  break;
189 
190  case 'ilexportgui':
191  $this->prepareOutput();
192 
193  $GLOBALS['DIC']->tabs()->setTabActive('export');
194 
195  require_once 'Services/Export/classes/class.ilExportGUI.php';
196  $exp = new ilExportGUI($this);
197  $exp->addFormat('xml');
198  $this->ctrl->forwardCommand($exp);
199  break;
200 
201  case 'ilobjectcopygui':
202  $this->prepareOutput();
203  include_once 'Services/Object/classes/class.ilObjectCopyGUI.php';
204  $cp = new ilObjectCopyGUI($this);
205  $cp->setType('chtr');
206  $this->ctrl->forwardCommand($cp);
207  break;
208 
209  case "ilcommonactiondispatchergui":
210  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
212  $this->ctrl->forwardCommand($gui);
213  break;
214 
215  default:
216  try {
217  $res = explode('-', $this->ctrl->getCmd(), 2);
218  $result = $this->dispatchCall($res[0], isset($res[1]) ? $res[1] : '');
219  if (!$result && method_exists($this, $this->ctrl->getCmd() . 'Object')) {
220  $this->prepareOutput();
221  $this->{$this->ctrl->getCmd() . 'Object'}();
222  }
223  } catch (Exception $e) {
224  $error = array(
225  'success' => false,
226  'reason' => $e->getMessage()
227  );
228  echo json_encode($error);
229  exit;
230  }
231  break;
232  }
233  }
exit
Definition: login.php:29
$result
GUI class for the workflow of copying objects.
$_GET["client_id"]
Class ilChatroomFormFactory.
Export User Interface Class.
prepareOutput($a_show_subobjects=true)
prepare output
foreach($_POST as $key=> $value) $res
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Class ilChatroomTabGUIFactory.
$DIC
Definition: xapitoken.php:46
getCreationMode()
get creation mode
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$factory
Definition: metadata.php:58
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ fallback()

ilObjChatroomGUI::fallback ( )

Calls $this->prepareOutput method and sets template variable.

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

References ilObjectGUI\prepareOutput().

254  {
255  $this->prepareOutput();
256  $this->tpl->setVariable('ADM_CONTENT', $this->lng->txt('invalid_operation'));
257  }
prepareOutput($a_show_subobjects=true)
prepare output
+ Here is the call graph for this function:

◆ getConnector()

ilObjChatroomGUI::getConnector ( )
Returns
ilChatroomServerConnector

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

References ilObjectGUI\$settings, and ilChatroomAdmin\getDefaultConfiguration().

239  {
240  require_once 'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
241  require_once 'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
242  require_once 'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
243 
244  $settings = ilChatroomAdmin::getDefaultConfiguration()->getServerSettings();
245  $connector = new ilChatroomServerConnector($settings);
246 
247  return $connector;
248  }
static getDefaultConfiguration()
Instantiates and returns ilChatroomAdmin object using instance_id and settings from settingsTable...
Class ilChatroomServerConnector.
+ Here is the call graph for this function:

◆ getObjectDefinition()

ilObjChatroomGUI::getObjectDefinition ( )
protected

Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition.

Returns
ilChatroomObjectDefinition

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

References ilChatroomObjectDefinition\getDefaultDefinition().

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

◆ getRefId()

ilObjChatroomGUI::getRefId ( )

Returns RefId.

Returns
integer

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

Referenced by addLocatorItems().

119  {
120  return $this->object->getRefId();
121  }
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjChatroomGUI::initCreationForms (   $a_new_type)
protected

{}

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

96  {
97  $forms = parent::initCreationForms($a_new_type);
98 
99  $forms[self::CFORM_NEW]->clearCommandButtons();
100  $forms[self::CFORM_NEW]->addCommandButton('create-save', $this->lng->txt($a_new_type . '_add'));
101  $forms[self::CFORM_NEW]->addCommandButton('cancel', $this->lng->txt('cancel'));
102  return $forms;
103  }

◆ settings()

ilObjChatroomGUI::settings ( )

Calls prepareOutput method.

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

References $_GET, $_POST, $DIC, $location, $objId, $type, ilRbacLog\add(), ilRbacLog\CREATE_OBJECT, ilRbacLog\gatherFaPa(), ilObjectGUI\prepareOutput(), and ilUtil\stripSlashes().

263  {
264  $this->prepareOutput();
265  }
prepareOutput($a_show_subobjects=true)
prepare output
+ Here is the call graph for this function:

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