ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

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
 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...
 
 showMountWebfolderIcon ()
 
 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
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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, array, 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  }
Class ilChatroomServerHandler.
$_GET["client_id"]
Create styles array
The data for the language used.

Member Function Documentation

◆ _forwards()

ilObjChatroomGUI::_forwards ( )

Returns an empty array.

Returns
array

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

References array.

120  {
121  return array();
122  }
Create styles array
The data for the language used.

◆ _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, $params, 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  }
63  include_once 'Services/Object/classes/class.ilObjectGUI.php';
65  } elseif ($DIC->rbac()->system()->checkAccess('read', ROOT_FOLDER_ID)) {
66  ilUtil::sendInfo(sprintf($DIC->language()->txt('msg_no_perm_read_item'), ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id))), true);
67  include_once 'Services/Object/classes/class.ilObjectGUI.php';
68  ilObjectGUI::_gotoRepositoryNode(ROOT_FOLDER_ID, '');
69  }
70 
71  $DIC['ilErr']->raiseError(sprintf($DIC->language()->txt('msg_no_perm_read_item'), ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id))), $DIC['ilErr']->FATAL);
72  }
$params
Definition: disable.php:11
global $DIC
Definition: saml.php:7
$_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)
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjChatroomGUI::addLocatorItems ( )
protected

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

References $DIC, getRefId(), and object.

98  {
99  global $DIC;
100 
101  if (is_object($this->object)) {
102  $DIC['ilLocator']->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 'view'), '', $this->getRefId());
103  }
104  }
global $DIC
Definition: saml.php:7
getRefId()
Returns RefId.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ executeCommand()

ilObjChatroomGUI::executeCommand ( )

{}

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

References $_GET, $DIC, $error, $factory, $form, $GLOBALS, $res, $result, array, exit, ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), and ilObjectGUI\prepareOutput().

128  {
129  global $DIC;
130 
131  if ('cancel' == $this->ctrl->getCmd() && $this->getCreationMode()) {
132  parent::cancelCreation();
133  return;
134  }
135 
136  // add entry to navigation history
137  if (!$this->getCreationMode() && $DIC->access()->checkAccess('read', '', (int) $_GET['ref_id'])) {
138  $DIC['ilNavigationHistory']->addItem($_GET['ref_id'], './goto.php?target=' . $this->type . '_' . $_GET['ref_id'], $this->type);
139  }
140 
141  $next_class = $this->ctrl->getNextClass();
142 
143  require_once 'Modules/Chatroom/classes/class.ilChatroomTabGUIFactory.php';
144  if (!$this->getCreationMode()) {
145  $tabFactory = new ilChatroomTabGUIFactory($this);
146 
147  if (strtolower($_GET['baseClass']) == 'iladministrationgui') {
148  $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
149  } else {
150  $DIC['ilHelp']->setScreenIdComponent("chtr");
151  $tabFactory->getTabsForCommand($this->ctrl->getCmd());
152  }
153  }
154 
155  // #8701 - infoscreen actions
156  if ($next_class == 'ilinfoscreengui' && $this->ctrl->getCmd() != 'info') {
157  $this->ctrl->setCmd('info-' . $this->ctrl->getCmd());
158  }
159  // repository info call
160  if ($this->ctrl->getCmd() == 'infoScreen') {
161  $this->ctrl->setCmdClass('ilinfoscreengui');
162  $this->ctrl->setCmd('info');
163  }
164 
165  switch ($next_class) {
166  case "ilpropertyformgui":
167  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
168 
169  require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
171  $form = $factory->getClientSettingsForm();
172 
173  $this->ctrl->forwardCommand($form);
174  break;
175  case 'ilpermissiongui':
176  include_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
177  $this->prepareOutput();
178  $perm_gui = new ilPermissionGUI($this);
179  $this->ctrl->forwardCommand($perm_gui);
180  break;
181 
182  case 'ilexportgui':
183  $this->prepareOutput();
184 
185  $GLOBALS['DIC']->tabs()->setTabActive('export');
186 
187  require_once 'Services/Export/classes/class.ilExportGUI.php';
188  $exp = new ilExportGUI($this);
189  $exp->addFormat('xml');
190  $this->ctrl->forwardCommand($exp);
191  break;
192 
193  case 'ilobjectcopygui':
194  $this->prepareOutput();
195  include_once 'Services/Object/classes/class.ilObjectCopyGUI.php';
196  $cp = new ilObjectCopyGUI($this);
197  $cp->setType('chtr');
198  $this->ctrl->forwardCommand($cp);
199  break;
200 
201  case "ilcommonactiondispatchergui":
202  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
204  $this->ctrl->forwardCommand($gui);
205  break;
206 
207  default:
208  try {
209  $res = explode('-', $this->ctrl->getCmd(), 2);
210  $result = $this->dispatchCall($res[0], isset($res[1]) ? $res[1] : '');
211  if (!$result && method_exists($this, $this->ctrl->getCmd() . 'Object')) {
212  $this->prepareOutput();
213  $this->{$this->ctrl->getCmd() . 'Object'}();
214  }
215  } catch (Exception $e) {
216  $error = array(
217  'success' => false,
218  'reason' => $e->getMessage()
219  );
220  echo json_encode($error);
221  exit;
222  }
223  break;
224  }
225  }
$result
GUI class for the workflow of copying objects.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$factory
Definition: metadata.php:47
Class ilChatroomFormFactory.
Export User Interface Class.
prepareOutput($a_show_subobjects=true)
prepare output
$error
Definition: Error.php:17
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
Create styles array
The data for the language used.
Class ilChatroomTabGUIFactory.
getCreationMode()
get creation mode
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
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 245 of file class.ilObjChatroomGUI.php.

References ilObjectGUI\prepareOutput().

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

◆ getConnector()

ilObjChatroomGUI::getConnector ( )
Returns
ilChatroomServerConnector

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

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

231  {
232  require_once 'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
233  require_once 'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
234  require_once 'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
235 
236  $settings = ilChatroomAdmin::getDefaultConfiguration()->getServerSettings();
237  $connector = new ilChatroomServerConnector($settings);
238 
239  return $connector;
240  }
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 79 of file class.ilObjChatroomGUI.php.

References ilChatroomObjectDefinition\getDefaultDefinition().

80  {
82  }
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 110 of file class.ilObjChatroomGUI.php.

Referenced by addLocatorItems().

111  {
112  return $this->object->getRefId();
113  }
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjChatroomGUI::initCreationForms (   $a_new_type)
protected

{}

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

88  {
89  $forms = parent::initCreationForms($a_new_type);
90 
91  $forms[self::CFORM_NEW]->clearCommandButtons();
92  $forms[self::CFORM_NEW]->addCommandButton('create-save', $this->lng->txt($a_new_type . '_add'));
93  $forms[self::CFORM_NEW]->addCommandButton('cancel', $this->lng->txt('cancel'));
94  return $forms;
95  }

◆ settings()

ilObjChatroomGUI::settings ( )

Calls prepareOutput method.

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

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

255  {
256  $this->prepareOutput();
257  }
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: