5 require_once
"./Services/Object/classes/class.ilObject.php";
24 public function __construct($a_id = 0, $a_call_by_reference =
true)
27 $this->
ilObject($a_id, $a_call_by_reference);
38 $userInfo =
new stdClass();
48 return $settings->get(
'public_room_ref', 0);
54 $rset = $ilDB->query(
'SELECT object_id FROM chatroom_settings WHERE room_type=' . $ilDB->quote(
'default' ,
'text'));
55 if (
$row = $ilDB->fetchAssoc($rset)) {
56 return $row[
'object_id'];
69 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
71 'il_chat_moderator_'.$this->
getRefId(),
72 "Moderator of chat obj_no.".$this->
getId(),
79 public function cloneObject($a_target_id,$a_copy_id = 0,$a_omit_tree =
false) {
81 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
84 $newObj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
88 $objId = $newObj->getId();
92 $original_settings = $original_room->getSettings();
95 $original_settings[
'object_id'] = $objId;
97 $room->saveSettings($original_settings);
100 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
101 $rbac_log_roles = $rbacreview->getParentRoleIds( $newObj->getRefId(), false );
getUserId()
Returns Ilias User ID.
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
Class ilObject Basic functions for all objects.
__construct($a_id=0, $a_call_by_reference=true)
Constructor.
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
ilObject($a_id=0, $a_reference=true)
Constructor public.
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
getId()
get object id public
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
getRefId()
get reference id public
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
getUsername()
Returns username from Object or SESSION.
getPersonalInformation(ilChatroomUser $user)
Prepares and returns $userInfo using given $user object.
initDefaultRoles()
type $rbacadmin type $rbacreview ilDB $ilDB