You are here

function Notifications_Subscription::format_field in Notifications 6.4

Same name and namespace in other branches
  1. 7 notifications.subscription.inc \Notifications_Subscription::format_field()

Format subscriptions field for display and get some more information

Return value

array() Array with 'name' and 'value' elements

1 call to Notifications_Subscription::format_field()
Notifications_Subscription::format_fields in includes/notifications_subscription.class.inc
Format all fields

File

includes/notifications_subscription.class.inc, line 897
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Message destination class

Code

function format_field($field, $format = self::FORMAT_HTML) {
  notifications_include('object.inc');
  $type = $field->field;
  $value = $field->value;
  $format_name = notifications_field_format_name($type);
  $format_value = notifications_field_format_value($type, $value, $format & self::FORMAT_HTML, NULL);
  return $format & self::FORMAT_INLINE ? $format_name . ': ' . $format_value : array(
    'name' => $format_name,
    'value' => $format_value,
  );
}