You are here

function notifications_field_subscription_options in Notifications 6.4

Get options for fields with options callback, may depend on subscription type

  • First tries 'subscription_type options callback'
  • If not found try generic 'options callback'
2 calls to notifications_field_subscription_options()
notifications_field_format_value in includes/object.inc
Format field value
notifications_field_form_element in includes/object.inc
Build a form element to edit a field

File

includes/object.inc, line 331
Notifications object and fields

Code

function notifications_field_subscription_options($type, $subscription = NULL) {

  // First try specific options for this subscription type if any
  if ($subscription && ($info = notifications_field_get_info($type, "{$subscription->type} options callback"))) {
    return _notifications_info_callback($info, "{$subscription->type} options callback", array(
      $subscription,
    ));
  }
  elseif ($info = notifications_field_get_info($type, 'options callback')) {
    return _notifications_info_callback($info, 'options callback', array(
      $subscription,
    ));
  }
}