You are here

public function views_handler_argument_field_list_string::summary_name in Views (for Drupal 7) 7.3

Provides the name to use for the summary.

By default this is just the name field.

Parameters

object $data: The query results for the row.

Return value

string The summary.

Overrides views_handler_argument_string::summary_name

File

modules/field/views_handler_argument_field_list_string.inc, line 60
Definition of views_handler_argument_field_list_string.

Class

views_handler_argument_field_list_string
Argument handler for list field to show the human readable name in the summary.

Code

public function summary_name($data) {
  $value = $data->{$this->name_alias};

  // If the list element has a human readable name show it,
  if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) {
    return $this
      ->case_transform(field_filter_xss($this->allowed_values[$value]), $this->options['case']);
  }
  else {
    return $this
      ->case_transform(check_plain($value), $this->options['case']);
  }
}