22 return $this->
if->identifier(
'awareness');
31 return [$this->
getId()];
45 if (!$awrn_set->get(
"awrn_enabled",
false) || ANONYMOUS_USER_ID ==
$ilUser->getId() ||
$ilUser->getId() == 0) {
49 $cache_period = (int) $awrn_set->get(
"caching_period");
54 $act->setRefId((
int)
$_GET[
"ref_id"]);
55 if ($last_update ==
"" || ($now - $last_update) >= $cache_period) {
56 $cnt = explode(
":", $act->getAwarenessUserCounter());
59 $act->notifyOnNewOnlineContacts();
70 $result = $gui->getAwarenessList(
true);
72 $content =
function () use (
$result) {
73 return $this->dic->ui()->factory()->legacy(
$result[
"html"]);
78 $f = $DIC->ui()->factory();
80 $online = explode(
":",
$result[
"cnt"]);
84 ->topLegacyItem($this->
getId())
86 if ($c instanceof
Bulky) {
87 return $c->withAdditionalOnLoadCode(
static function (
string $id) :
string {
90 return "$('#$id').on('click', function() { 91 console.log('click slate button'); 97 ->withLegacyContent($content())
99 $this->dic->ui()->factory()
103 ->withCounter(
$f->counter()->status((
int) $cnt))
104 ->withCounter(
$f->counter()->novelty((
int) $hcnt))
106 ->withTitle($this->dic->language()->txt(
"awra"))
108 ->withAvailableCallable(
109 function () use ($DIC, $online) {
113 if ($online <= 0 || !$awrn_set->
get(
"awrn_enabled",
false) || ANONYMOUS_USER_ID ==
$ilUser->getId()) {
static getInstance($a_user_id)
Get instance (for a user)
Class ChatMainBarProvider .
Interface IdentificationInterface.
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
withSymbol(Symbol $symbol)