function Notifications_Subscription_List::options_subform in Notifications 7
Subform with subscription options so it can be reused for a fieldset on a bigger form
Was: notifications_object_options_subform($subscriptions, $buttons = TRUE)
Parameters
$subscriptions: List of subscription objects
$buttons: Whether to add buttons to the fieldset
File
- ./
notifications.list.inc, line 358 - Drupal Notifications Framework - Default class file
Class
- Notifications_Subscription_List
- List of subscriptions or subscription types
Code
function options_subform($buttons = TRUE) {
$form['subscriptions'] = $this
->options_fieldset(TRUE);
$form['subscriptions'] += array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
if ($buttons) {
$form['subscriptions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
);
// If full form, redirect so the full page which may have subscription links is updated
$form['#redirect'] = $_GET['q'];
}
$form['#submit'][] = 'notifications_subscriptions_options_form_submit';
return $form;
}