ILIAS  release_8 Revision v8.24
ilObjChatroomGUI Class Reference

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

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

Public Member Functions

 __construct ($data=null, ?int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 getUnsafeGetCommands ()
 @inheritDoc More...
 
 getSafePostCommands ()
 @inheritDoc More...
 
 executeCommand ()
 
 getConnector ()
 
 fallback ()
 Calls $this->prepareOutput method and sets template variable. More...
 
 settings ()
 Calls prepareOutput method. More...
 
 insertObject ()
 
- 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
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
 getUnsafeGetCommands ()
 This method must return a list of unsafe GET commands. More...
 
 getSafePostCommands ()
 This method must return a list of safe POST commands. More...
 

Static Public Member Functions

static _goto ($params)
 @ineritdoc More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 getObjectDefinition ()
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
- Protected Member Functions inherited from ilChatroomObjectGUI
 dispatchCall (string $gui, string $method)
 
 getObjectDefinition ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilChatroomObjectGUI
GlobalHttpState $http
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

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

Constructor & Destructor Documentation

◆ __construct()

ilObjChatroomGUI::__construct (   $data = null,
?int  $id = 0,
bool  $call_by_reference = true,
bool  $prepare_output = true 
)

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

36 {
37 $this->type = 'chtr';
39 $this->lng->loadLanguageModule('chatroom');
40 $this->lng->loadLanguageModule('chatroom_adm');
41 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ilObjectGUI\$call_by_reference, ilObjectGUI\$data, ilObjectGUI\$id, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjChatroomGUI::_goto (   $params)
static

@ineritdoc

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

46 : void
47 {
48 global $DIC;
49 $main_tpl = $DIC->ui()->mainTemplate();
50
51 $parts = array_filter(explode('_', $params));
52 $ref_id = (int) $parts[0];
53 $sub = (int) ($parts[1] ?? 0);
54
55 if (ilChatroom::checkUserPermissions('read', $ref_id, false)) {
56 if ($sub) {
57 $DIC->ctrl()->setParameterByClass(self::class, 'sub', $sub);
58 }
59
60 $DIC->ctrl()->setParameterByClass(self::class, 'ref_id', $ref_id);
61 $DIC->ctrl()->redirectByClass(
62 [
63 ilRepositoryGUI::class,
64 self::class,
65 ],
66 'view'
67 );
68 } elseif (ilChatroom::checkUserPermissions('visible', $ref_id, false)) {
69 $DIC->ctrl()->setParameterByClass(ilInfoScreenGUI::class, 'ref_id', $ref_id);
70 $DIC->ctrl()->redirectByClass(
71 [
72 ilRepositoryGUI::class,
73 self::class,
74 ilInfoScreenGUI::class
75 ],
76 'info'
77 );
78 } elseif ($DIC->rbac()->system()->checkAccess('read', ROOT_FOLDER_ID)) {
79 $main_tpl->setOnScreenMessage('info', sprintf(
80 $DIC->language()->txt('msg_no_perm_read_item'),
82 ), true);
84 }
85
86 $DIC['ilErr']->raiseError(
87 sprintf(
88 $DIC->language()->txt('msg_no_perm_read_item'),
90 ),
91 $DIC['ilErr']->FATAL
92 );
93 }
static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
global $DIC
Definition: feed.php:28
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64

References $DIC, $params, $parts, ilObjectGUI\$ref_id, ilObjectGUI\_gotoRepositoryNode(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilChatroom\checkUserPermissions(), ILIAS\Repository\int(), and ROOT_FOLDER_ID.

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

111 : void
112 {
113 if (is_object($this->object)) {
114 $this->locator->addItem(
115 $this->object->getTitle(),
116 $this->ctrl->getLinkTarget($this, 'view'),
117 '',
118 $this->getRefId()
119 );
120 }
121 }

References ILIAS\Repository\locator(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjChatroomGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

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

146 : void
147 {
148 global $DIC;
149
150 if ('cancel' === $this->ctrl->getCmd() && $this->getCreationMode()) {
151 $this->cancelCreation();
152 return;
153 }
154
155 $refId = $this->http->wrapper()->query()->retrieve('ref_id', $this->refinery->kindlyTo()->int());
156 if (!$this->getCreationMode() && ilChatroom::checkPermissionsOfUser($this->user->getId(), 'read', $refId)) {
157 $DIC['ilNavigationHistory']->addItem(
158 $refId,
159 './goto.php?target=' . $this->type . '_' . $refId,
160 $this->type
161 );
162 }
163
164 $next_class = $this->ctrl->getNextClass();
165
166 $tabFactory = null;
167 if (!$this->getCreationMode()) {
168 $tabFactory = new ilChatroomTabGUIFactory($this);
169
170 $baseClass = '';
171 if ($this->http->wrapper()->query()->has('baseClass')) {
172 $baseClass = $this->http->wrapper()->query()->retrieve(
173 'baseClass',
174 $this->refinery->kindlyTo()->string()
175 );
176 }
177 if (strtolower($baseClass) === strtolower(ilAdministrationGUI::class)) {
178 $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
179 } else {
180 $DIC['ilHelp']->setScreenIdComponent('chtr');
181 $tabFactory->getTabsForCommand($this->ctrl->getCmd());
182 }
183 }
184
185 // #8701 - infoscreen actions
186 if ($this->ctrl->getCmd() !== 'info' && strtolower($next_class) === strtolower(ilInfoScreenGUI::class)) {
187 $this->ctrl->setCmd('info-' . $this->ctrl->getCmd());
188 }
189
190 // repository info call
191 if ($this->ctrl->getCmd() === 'infoScreen') {
192 $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
193 $this->ctrl->setCmd('info');
194 }
195
196 switch (strtolower($next_class)) {
197 case strtolower(ilPropertyFormGUI::class):
199 $form = $factory->getClientSettingsForm();
200 $this->ctrl->forwardCommand($form);
201 break;
202
203 case strtolower(ilPermissionGUI::class):
204 $this->prepareOutput();
205 $perm_gui = new ilPermissionGUI($this);
206 $this->ctrl->forwardCommand($perm_gui);
207 break;
208
209 case strtolower(ilExportGUI::class):
210 $this->prepareOutput();
211
212 $GLOBALS['DIC']->tabs()->setTabActive('export');
213
214 $exp = new ilExportGUI($this);
215 $exp->addFormat('xml');
216 $this->ctrl->forwardCommand($exp);
217 break;
218
219 case strtolower(ilObjectCopyGUI::class):
220 $this->prepareOutput();
221 $cp = new ilObjectCopyGUI($this);
222 $cp->setType('chtr');
223 $this->ctrl->forwardCommand($cp);
224 break;
225
226 case strtolower(ilCommonActionDispatcherGUI::class):
227 $this->prepareOutput();
229 $this->ctrl->forwardCommand($gui);
230 break;
231
232 default:
233 try {
234 $res = explode('-', $this->ctrl->getCmd(''), 2);
235 $result = $this->dispatchCall($res[0], $res[1] ?? '');
236 if (!$result && method_exists($this, $this->ctrl->getCmd() . 'Object')) {
237 $this->prepareOutput();
238 $this->{$this->ctrl->getCmd() . 'Object'}();
239 }
240 } catch (Exception $e) {
241 if ($this->ctrl->isAsynch()) {
242 $responseStream = Streams::ofString(json_encode([
243 'success' => false,
244 'reason' => $e->getMessage()
245 ], JSON_THROW_ON_ERROR));
246 $this->http->saveResponse(
247 $this->http->response()
248 ->withBody($responseStream)
249 ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
250 );
251 $this->http->sendResponse();
252 $this->http->close();
253 } else {
254 throw $e;
255 }
256 }
257 break;
258 }
259
260 if ($tabFactory !== null &&
261 $tabFactory->getActivatedTab() !== null &&
262 $this->tabs_gui->getActiveTab() !== $tabFactory->getActivatedTab()) {
263 $this->tabs_gui->activateTab($tabFactory->getActivatedTab());
264 }
265 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Class ilChatroomFormFactory.
dispatchCall(string $gui, string $method)
Class ilChatroomTabGUIFactory.
static checkPermissionsOfUser(int $usr_id, $permissions, int $ref_id)
Checks user permissions in question for a given user id in relation to a given ref_id.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
cancelCreation()
cancel create action and go back to repository parent
prepareOutput(bool $show_sub_objects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$res
Definition: ltiservices.php:69
$factory
Definition: metadata.php:75
static http()
Fetches the global http state from ILIAS.
$refId
Definition: xapitoken.php:58

References $DIC, Vendor\Package\$e, $factory, $GLOBALS, $refId, $res, ilObjectGUI\cancelCreation(), ilChatroom\checkPermissionsOfUser(), ILIAS\Repository\ctrl(), ilChatroomObjectGUI\dispatchCall(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ILIAS\FileDelivery\http(), ilObjectGUI\prepareOutput(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ fallback()

ilObjChatroomGUI::fallback ( )

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

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

275 : void
276 {
277 $this->prepareOutput();
278 $this->tpl->setVariable('ADM_CONTENT', $this->lng->txt('invalid_operation'));
279 }

References ILIAS\Repository\lng(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getConnector()

ilObjChatroomGUI::getConnector ( )

Reimplemented from ilChatroomObjectGUI.

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

268 {
270 }
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

Reimplemented from ilChatroomObjectGUI.

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

96 {
98 }
static getDefaultDefinition(string $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 ( )

Reimplemented from ilObjectGUI.

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

123 : int
124 {
125 return $this->object->getRefId();
126 }

◆ getSafePostCommands()

ilObjChatroomGUI::getSafePostCommands ( )

@inheritDoc

Implements ilCtrlSecurityInterface.

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

139 : array
140 {
141 return [
142 'view-toggleAutoMessageDisplayState',
143 ];
144 }

◆ getUnsafeGetCommands()

ilObjChatroomGUI::getUnsafeGetCommands ( )

@inheritDoc

Implements ilCtrlSecurityInterface.

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

131 : array
132 {
133 return [];
134 }

◆ initCreationForms()

ilObjChatroomGUI::initCreationForms ( string  $new_type)
protected

Init creation forms.

This will create the default creation forms: new, import, clone

Returns
array<int, ilPropertyFormGUI>

Reimplemented from ilObjectGUI.

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

100 : array
101 {
102 $forms = parent::initCreationForms($new_type);
103
104 $forms[self::CFORM_NEW]->clearCommandButtons();
105 $forms[self::CFORM_NEW]->addCommandButton('create-save', $this->lng->txt($new_type . '_add'));
106 $forms[self::CFORM_NEW]->addCommandButton('cancel', $this->lng->txt('cancel'));
107
108 return $forms;
109 }

References ilObjectGUI\CFORM_NEW, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ insertObject()

ilObjChatroomGUI::insertObject ( )

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

290 {
291 $new_type = $this->type;
292 $refId = $this->http->wrapper()->query()->retrieve('ref_id', $this->refinery->kindlyTo()->int());
293 $title = '';
294 if ($this->http->wrapper()->post()->has('title')) {
295 $title = ilUtil::stripSlashes(
296 $this->http->wrapper()->post()->retrieve(
297 'title',
298 $this->refinery->kindlyTo()->string()
299 )
300 );
301 }
302 $desc = '';
303 if ($this->http->wrapper()->post()->has('desc')) {
304 $desc = ilUtil::stripSlashes(
305 $this->http->wrapper()->post()->retrieve(
306 'desc',
307 $this->refinery->kindlyTo()->string()
308 )
309 );
310 }
311
312 // create permission is already checked in createObject.
313 // This check here is done to prevent hacking attempts
314 if (!$this->rbac_system->checkAccess('create', $refId, $new_type)) {
315 $this->ilias->raiseError(
316 $this->lng->txt('no_create_permission'),
317 $this->ilias->error_obj->MESSAGE
318 );
319 }
320
321 // create and insert object in objecttree
322 $class_name = 'ilObj' . $this->obj_definition->getClassName($new_type);
323
324 $newObj = new $class_name();
325 $newObj->setType($new_type);
326 $newObj->setTitle($title);
327 $newObj->setDescription($desc);
328 $newObj->create();
329 $newObj->createReference();
330 $newObj->putInTree($refId);
331 $newObj->setPermissions($refId);
332
333 $objId = $newObj->getId();
334
335 $room = new ilChatroom();
336 $room->saveSettings([
337 'object_id' => $objId,
338 'autogen_usernames' => 'Autogen #',
339 'display_past_msgs' => 20,
340 'private_rooms_enabled' => 0
341 ]);
342
343 $rbac_log_roles = $this->rbac_review->getParentRoleIds($newObj->getRefId());
344 $rbac_log = ilRbacLog::gatherFaPa($newObj->getRefId(), array_keys($rbac_log_roles), true);
345 ilRbacLog::add(ilRbacLog::CREATE_OBJECT, $newObj->getRefId(), $rbac_log);
346
347 $this->object = $newObj;
348
349 return $newObj;
350 }
Class ilChatroom.
Class ilObjChatroom.
static add(int $a_action, int $a_ref_id, array $a_diff, bool $a_source_ref_id=false)
static gatherFaPa(int $a_ref_id, array $a_role_ids, bool $a_add_action=false)
const CREATE_OBJECT
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
header include for all ilias files.
$objId
Definition: xapitoken.php:57

References $objId, $refId, ilObjectGUI\$type, ilRbacLog\add(), ilRbacLog\CREATE_OBJECT, ilRbacLog\gatherFaPa(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ settings()

ilObjChatroomGUI::settings ( )

Calls prepareOutput method.

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

284 : void
285 {
286 $this->prepareOutput();
287 }

References ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

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