function PartyUserDataSetUIAttach::action_form in Party 7
Same name and namespace in other branches
- 8.2 modules/party_user/includes/party_user.data_ui.inc \PartyUserDataSetUIAttach::action_form()
Provides the action form for attaching an existing user.
Parameters
$party: A loaded party object.
$data_set: A loaded data set. We don't actually need this loaded, but we need a menu loader to convert the path-style string to the machine name, and a menu loader that doesn't load would be weird too.
$eid: The id of the entity, if relevant to this action.
Overrides PartyDefaultDataSetUIAttach::action_form
File
- modules/
party_user/ includes/ party_user.data_ui.inc, line 25 - Provides classes for UI actions on the user data set.
Class
- PartyUserDataSetUIAttach
- The 'attach' action: attach an existing entity.
Code
function action_form($form, &$form_state, $party, $data_set, $eid = NULL) {
$form = array();
$form['user'] = array(
'#type' => 'textfield',
'#title' => t('User'),
'#maxlength' => 60,
'#autocomplete_path' => 'user/autocomplete',
'#description' => t('Enter the username of the account to attach.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Attach user'),
'#weight' => 99,
);
return $form;
}