You are here

function subscriptions_delete_form in Subscriptions 6

Same name and namespace in other branches
  1. 5.2 subscriptions.module \subscriptions_delete_form()
  2. 7 subscriptions.module \subscriptions_delete_form()
  3. 2.0.x subscriptions.module.old.php \subscriptions_delete_form()

Provide the form definition for deleting subscriptions via s/del/... (aka subscriptions/rem/...) link.

Callback of _subscriptions_menu().

Parameters

$form_state: FAPI form state.

$module: Module that controls the subscription.

$field: Field that controls the subscription (subscription type).

$value: Subscription parameter (depends on type).

$author_uid: User ID for author-specific subscriptions or -1/NULL for all authors.

$recipient_uid: User ID of the subscriber.

See also

_subscriptions_menu()

1 call to subscriptions_delete_form()
subscriptions_del_form in ./subscriptions.admin.inc
Provide the form definition for deleting subscriptions via subscriptions/del/... link.
1 string reference to 'subscriptions_delete_form'
subscriptions_menu in ./subscriptions.module
Implementation of hook_menu().

File

./subscriptions.module, line 448
Subscriptions module.

Code

function subscriptions_delete_form(&$form_state, $module, $field, $value, $author_uid, $recipient_uid) {
  $form['data'] = array(
    '#type' => 'value',
    '#value' => array(
      $module,
      $field,
      $value,
      $author_uid,
      $recipient_uid,
    ),
  );

  // We might be called from subscriptions_del_form() and don't want to submit to subscriptions_del_form_submit():
  $form['#submit'][] = 'subscriptions_delete_form_submit';
  return confirm_form($form, t('Are you sure you want to unsubscribe?'), '<front>', NULL, t('Unsubscribe'));
}