You are here

function quiz_views_handler_field_takes::render in Quiz 7

Same name and namespace in other branches
  1. 8.4 includes/views/handlers/quiz_views_handler_field_takes.inc \quiz_views_handler_field_takes::render()
  2. 6.6 includes/views/handlers/quiz_views_handler_field_takes.inc \quiz_views_handler_field_takes::render()
  3. 6.3 includes/views/handlers/quiz_views_handler_field_takes.inc \quiz_views_handler_field_takes::render()
  4. 6.4 includes/views/handlers/quiz_views_handler_field_takes.inc \quiz_views_handler_field_takes::render()
  5. 6.5 includes/views/handlers/quiz_views_handler_field_takes.inc \quiz_views_handler_field_takes::render()
  6. 7.6 includes/views/handlers/quiz_views_handler_field_takes.inc \quiz_views_handler_field_takes::render()
  7. 7.4 includes/views/handlers/quiz_views_handler_field_takes.inc \quiz_views_handler_field_takes::render()

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

includes/views/handlers/quiz_views_handler_field_takes.inc, line 8

Class

quiz_views_handler_field_takes

Code

function render($values) {
  $value = $values->{$this->field_alias};
  if ((int) $value === 0) {
    return 'Unlimited';
  }
  return $value;
}