You are here

function subscriptions_del_form in Subscriptions 6

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

Provide the form definition for deleting subscriptions via subscriptions/del/... link.

Callback of _subscriptions_menu() in subscriptions.module.

Parameters

$form_state: FAPI form state.

$stype: Subscription type.

$sid: Subscription parameter (depends on type).

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

See also

_subscriptions_menu()

1 string reference to 'subscriptions_del_form'
subscriptions_menu in ./subscriptions.module
Implementation of hook_menu().

File

./subscriptions.admin.inc, line 917
Subscriptions module (load-on-demand admin functions).

Code

function subscriptions_del_form(&$form_state, $stype, $sid, $author_uid = NULL) {
  global $user;
  if ($a = module_invoke_all('subscriptions', 'stype', $stype, $sid, isset($author_uid) ? $author_uid : -1)) {

    // Allow other modules to alter the data.
    drupal_alter('subscriptions_stype', $a);
    list($module, $field, $value, $author_uid) = $a;
    return subscriptions_delete_form($form_state, $module, $field, $value, $author_uid, $user->uid);
  }
  drupal_set_message(t('Your subscription could not be deactivated.'));
}