You are here

function subscriptions_del_form in Subscriptions 7

Same name and namespace in other branches
  1. 5.2 subscriptions.admin.inc \subscriptions_del_form()
  2. 6 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.

_state FAPI form state.

Parameters

array $form:

string $stype: Subscription type.

mixed $sid: Subscription parameter (depends on type).

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

Return value

array|null

See also

_subscriptions_menu()

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

File

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

Code

function subscriptions_del_form(array $form, array &$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, $form_state, $module, $field, $value, $author_uid, $user->uid);
  }
  drupal_set_message(t('Your subscription could not be deactivated.'));
  return NULL;
}