You are here

function notifications_views_handler_field_subscription_type::render_name in Notifications 7

Render field as human readable name, unless using machine_name option.

File

notifications_views/includes/notifications_views_handler_field_subscription_type.inc, line 10

Class

notifications_views_handler_field_subscription_type
Field handler to translate a node type into its readable form.

Code

function render_name($data, $values) {
  if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
    $type = notifications_subscription_type($data);
    $name = isset($type['title']) ? $type['title'] : t('Unknown');
    return t($this
      ->sanitize_value($name));
  }
  return $this
    ->sanitize_value($data);
}