ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 {execute command} 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 ()
 {administration tabs show only permissions and trash folder} 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 @access 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 ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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)
 {Init creation froms.this will create the default creation forms: new, import, clone
Parameters
string$a_new_type
Returns
array
} More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Detailed Description

Class ilObjChatroomGUI GUI class for chatroom objects.

Author
Jan Posselt <jposselt at databay.de>
Version
$Id$ @ilCtrl_Calls ilObjChatroomGUI: ilMDEditorGUI, ilInfoScreenGUI, ilPermissionGUI, ilObjectCopyGUI @ilCtrl_Calls 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.

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 }
$_GET["client_id"]
Class ilChatroomServerHandler.
exit
Definition: login.php:29
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References exit.

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.

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);
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 }
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)
static _lookupTitle($a_id)
lookup object title
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const ROOT_FOLDER_ID
Definition: constants.php:30
global $DIC
Definition: goto.php:24

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

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjChatroomGUI::addLocatorItems ( )
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

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

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 }

References $DIC.

◆ executeCommand()

ilObjChatroomGUI::executeCommand ( )

{execute command}

Reimplemented from ilObjectGUI.

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

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");
211 $this->prepareOutput();
213 $this->ctrl->forwardCommand($gui);
214 break;
215
216 default:
217 try {
218 $res = explode('-', $this->ctrl->getCmd(), 2);
219 $result = $this->dispatchCall($res[0], isset($res[1]) ? $res[1] : '');
220 if (!$result && method_exists($this, $this->ctrl->getCmd() . 'Object')) {
221 $this->prepareOutput();
222 $this->{$this->ctrl->getCmd() . 'Object'}();
223 }
224 } catch (Exception $e) {
225 $error = array(
226 'success' => false,
227 'reason' => $e->getMessage()
228 );
229 echo json_encode($error);
230 exit;
231 }
232 break;
233 }
234 }
$result
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Class ilChatroomFormFactory.
Class ilChatroomTabGUIFactory.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
GUI class for the workflow of copying objects.
prepareOutput($a_show_subobjects=true)
prepare output
getCreationMode()
get creation mode
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$factory
Definition: metadata.php:58
foreach($_POST as $key=> $value) $res

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

+ Here is the call graph for this function:

◆ fallback()

ilObjChatroomGUI::fallback ( )

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

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

255 {
256 $this->prepareOutput();
257 $this->tpl->setVariable('ADM_CONTENT', $this->lng->txt('invalid_operation'));
258 }

◆ getConnector()

ilObjChatroomGUI::getConnector ( )
Returns
ilChatroomServerConnector

Reimplemented from ilChatroomObjectGUI.

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

240 {
241 require_once 'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
242 require_once 'Modules/Chatroom/classes/class.ilChatroomServerSettings.php';
243 require_once 'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
244
246 $connector = new ilChatroomServerConnector($settings);
247
248 return $connector;
249 }
static getDefaultConfiguration()
Instantiates and returns ilChatroomAdmin object using instance_id and settings from settingsTable.
Class ilChatroomServerConnector.

References ilChatroomAdmin\getDefaultConfiguration().

+ Here is the call graph for this function:

◆ getObjectDefinition()

ilObjChatroomGUI::getObjectDefinition ( )
protected

Returns object definition by calling getDefaultDefinition method in ilChatroomObjectDefinition.

Returns
ilChatroomObjectDefinition

Reimplemented from ilChatroomObjectGUI.

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

88 {
90 }
static getDefaultDefinition($moduleName)
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.

References ilChatroomObjectDefinition\getDefaultDefinition().

+ Here is the call graph for this function:

◆ getRefId()

ilObjChatroomGUI::getRefId ( )

Returns RefId.

Returns
integer

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

119 {
120 return $this->object->getRefId();
121 }

◆ initCreationForms()

ilObjChatroomGUI::initCreationForms (   $a_new_type)
protected

{Init creation froms.this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array
}

Reimplemented from ilObjectGUI.

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 263 of file class.ilObjChatroomGUI.php.

264 {
265 $this->prepareOutput();
266 }

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