function group_member_options_form in Group 7
Builds the group member administration options.
1 call to group_member_options_form()
- group_member_overview_form in admin/
group_membership.inc - Builds the group member overview form.
File
- admin/
group_membership.inc, line 152 - Group membership overview admin UI.
Code
function group_member_options_form(Group $group) {
$fs_options = array(
'#type' => 'fieldset',
'#title' => t('Update options'),
'#attributes' => array(
'class' => array(
'container-inline',
),
),
);
if (!group_access('administer members', $group)) {
$fs_options['#access'] = FALSE;
}
else {
$options = array();
foreach (module_invoke_all('group_member_operations', $group) as $operation => $array) {
if (!empty($array['optgroup'])) {
$options[$array['optgroup']][$operation] = $array['label'];
}
else {
$options[$operation] = $array['label'];
}
}
$fs_options['operation'] = array(
'#type' => 'select',
'#title' => t('Operation'),
'#title_display' => 'invisible',
'#options' => $options,
'#default_value' => 'approve',
);
$fs_options['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
'#validate' => array(
'group_member_options_form_validate',
),
'#submit' => array(
'group_member_options_form_submit',
),
);
}
return $fs_options;
}