4 require_once
'Services/User/Actions/classes/class.ilUserActionProvider.php';
25 parent::__construct();
27 $this->
user = $DIC[
'ilUser'];
43 $this->lng->loadLanguageModule(
'buddysystem');
45 "handle_req" => $this->lng->txt(
"buddy_handle_contact_request")
53 'ilBuddySystemLinkedRelationState' =>
'_contact_approved',
54 'ilBuddySystemIgnoredRequestRelationState' =>
'_contact_ignored' 62 require_once
'Services/User/Actions/classes/class.ilUserAction.php';
65 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
76 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddyList.php';
78 $requested_contacts = $buddylist->getRequestRelationsForOwner()->getKeys();
80 if(in_array($a_target_user, $requested_contacts))
82 require_once
'Services/Utilities/classes/class.ilStr.php';
83 require_once
'Services/Link/classes/class.ilLink.php';
85 $this->lng->loadLanguageModule(
'buddysystem');
87 $relation = $buddylist->getRelationByUserId($a_target_user);
88 foreach($relation->getCurrentPossibleTargetStates() as $target_state)
92 $this->lng->txt(
'buddy_bs_act_btn_txt_requested_to_' .
95 $f->setType(
"handle_req");
96 $f->setHref(
ilLink::_getStaticLink($a_target_user,
'usr',
true, self::$state_to_perm_link_map[get_class($target_state)]));
98 'current-state' => get_class($relation->getState()),
99 'target-state' => get_class($target_state),
100 'buddy-id' => $a_target_user,
101 'action' => $target_state->getAction())
103 $coll->addAction($f);
A class that provides a collection of actions on users.
static convertUpperCamelCaseToUnderscoreCase($value)
Convert a value given in camel case conversion to underscore case conversion (e.g.
static getInstanceByGlobalUser()
static getInstance()
Get instance.
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
Create styles array
The data for the language used.
static _isAnonymous($usr_id)
Action that can be performed on a user.