1<?
php declare(strict_types=1);
34 $this->
user = $DIC[
'ilUser'];
35 $this->lng =
$DIC[
'lng'];
77 $this->lng->loadLanguageModule(
'buddysystem');
83 $relation = $this->buddyList->getRelationByUserId($this->
getUsrId());
87 $relation->isUnlinked() &&
94 'tpl.buddy_system_link_button.html',
97 'Services/Contact/BuddySystem'
99 $buttonTemplate->setVariable(
102 (
int) $this->
user->getId(),
106 $buttonTemplate->setVariable(
'BUTTON_BUDDY_ID', $this->
getUsrId());
107 $buttonTemplate->setVariable(
'BUTTON_CSS_CLASS',
'ilBuddySystemLinkWidget');
108 $buttonTemplate->setVariable(
'BUTTON_CURRENT_STATE', get_class($relation->getState()));
110 return $buttonTemplate->get();
An exception for terminatinating execution or to throw for unit testing.
static getInstanceByGlobalUser()
static getInstance(?ilLanguage $lng=null)
static _lookupPref($a_usr_id, $a_keyword)
special template class to simplify handling of ITX/PEAR
static yn2tf($a_yn)
convert "y"/"n" to true/false