Adds link to chat.
More...
◆ __construct()
ilChatUserActionProvider::__construct |
( |
| ) |
|
Constructor.
Definition at line 45 of file class.ilChatUserActionProvider.php.
References ilObjChatroom\_getPublicRefId().
47 parent::__construct();
49 include_once
'Modules/Chatroom/classes/class.ilObjChatroom.php';
52 $chatSettings =
new ilSetting(
'chatroom');
53 $this->chat_enabled = $chatSettings->get(
'chat_enabled');
54 $this->osc_enabled = $chatSettings->get(
'enable_osc');
56 $this->lng->loadLanguageModule(
'chatroom');
◆ acceptsMessages()
ilChatUserActionProvider::acceptsMessages |
( |
|
$a_user_id | ) |
|
|
protected |
◆ checkUserChatAccess()
ilChatUserActionProvider::checkUserChatAccess |
( |
|
$a_user_id | ) |
|
|
protected |
Check user chat access.
- Parameters
-
- Returns
- bool
Definition at line 85 of file class.ilChatUserActionProvider.php.
References $GLOBALS.
Referenced by collectActionsForTargetUser().
87 if(!array_key_exists($a_user_id, self::$user_access))
89 self::$user_access[$a_user_id] =
$GLOBALS[
'DIC']->rbac()->system()->checkAccessOfUser($a_user_id,
'read', $this->pub_ref_id);
92 return self::$user_access[$a_user_id];
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
◆ collectActionsForTargetUser()
ilChatUserActionProvider::collectActionsForTargetUser |
( |
|
$a_target_user | ) |
|
Collect all actions.
- Parameters
-
int | $a_target_user | target user |
- Returns
- ilUserActionCollection collection
Definition at line 115 of file class.ilChatUserActionProvider.php.
References ilObjUser\_lookupLogin(), acceptsMessages(), array, checkUserChatAccess(), ilUserActionCollection\getInstance(), and ilUserActionProvider\getUserId().
118 include_once(
"./Services/User/Actions/classes/class.ilUserAction.php");
120 require_once
'Services/User/classes/class.ilObjUser.php';
122 if(!$this->chat_enabled)
130 if ($a_target_user != $this->
getUserId())
135 $f->setType(
"invite");
136 $f->setText($this->lng->txt(
'chat_invite_public_room'));
137 $f->setHref(
'./ilias.php?baseClass=ilRepositoryGUI&ref_id=' . $this->pub_ref_id .
'&usr_id=' . $a_target_user .
'&cmd=view-invitePD');
138 $coll->addAction($f);
143 if($this->osc_enabled)
147 $f->setType(
"invite_osd");
150 $f->setText($this->lng->txt(
'chat_osc_start_conversation'));
152 'onscreenchat-userid' => $a_target_user,
158 $f->setText($this->lng->txt(
'chat_osc_doesnt_accept_msg'));
160 'onscreenchat-inact-userid' => $a_target_user
163 $coll->addAction($f);
static _lookupLogin($a_user_id)
lookup login
acceptsMessages($a_user_id)
static getInstance()
Get instance.
Create styles array
The data for the language used.
checkUserChatAccess($a_user_id)
Check user chat access.
Action that can be performed on a user.
◆ getActionTypes()
ilChatUserActionProvider::getActionTypes |
( |
| ) |
|
Definition at line 70 of file class.ilChatUserActionProvider.php.
References array.
73 "invite" => $this->lng->txt(
'chat_user_action_invite_public_room'),
74 "invite_osd" => $this->lng->txt(
'chat_user_action_invite_osd')
Create styles array
The data for the language used.
◆ getComponentId()
ilChatUserActionProvider::getComponentId |
( |
| ) |
|
◆ $accepts_messages_cache
ilChatUserActionProvider::$accepts_messages_cache = array() |
|
staticprotected |
◆ $chat_enabled
ilChatUserActionProvider::$chat_enabled = false |
|
protected |
◆ $osc_enabled
ilChatUserActionProvider::$osc_enabled = false |
|
protected |
◆ $pub_ref_id
ilChatUserActionProvider::$pub_ref_id = 0 |
|
protected |
◆ $user_access
ilChatUserActionProvider::$user_access = array() |
|
staticprotected |
The documentation for this class was generated from the following file: