function party_user_user_view in Party 8.2
Same name and namespace in other branches
- 7 modules/party_user/party_user.module \party_user_user_view()
Implements hook_user_view().
Add party action links to the user.
File
- modules/
party_user/ party_user.module, line 293 - Support for linking users to parties
Code
function party_user_user_view($account, $view_mode, $langcode) {
if ($view_mode == 'party') {
$party = party_user_get_party($account);
$data_set_controller = party_get_crm_controller($party, 'user');
$account->content['party_actions'] = array(
'#theme' => 'links',
'#links' => $data_set_controller
->getActions($party->pid, $account->uid),
'#attributes' => array(
'class' => array(
'links inline crm-set-action-links',
),
),
'#weight' => 100,
);
}
}