19 declare(strict_types=1);
44 $this->
user = $DIC[
'ilUser'];
45 $this->
lng = $DIC[
'lng'];
70 $this->
lng->loadLanguageModule(
'buddysystem');
76 $relation = $this->buddyList->getRelationByUserId($this->
getUsrId());
80 $relation->isUnlinked() &&
87 'tpl.buddy_system_link_button.html',
90 'Services/Contact/BuddySystem' 92 $buttonTemplate->setVariable(
95 (
int) $this->
user->getId(),
99 $buttonTemplate->setVariable(
'BUTTON_BUDDY_ID', $this->
getUsrId());
100 $buttonTemplate->setVariable(
'BUTTON_CSS_CLASS',
'ilBuddySystemLinkWidget');
101 $buttonTemplate->setVariable(
'BUTTON_CURRENT_STATE', get_class($relation->getState()));
103 return $buttonTemplate->get();
static getInstance(?ilLanguage $lng=null)
static getInstanceByGlobalUser()
static _lookupPref(int $a_usr_id, string $a_keyword)
static yn2tf(string $a_yn)