function getid3_handler_field_sample_rate::render in getID3() 7
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field_numeric::render
File
- includes/
getid3_handler_field_sample_rate.inc, line 43  - A special handler that properly formats bit rate fields as kHz.
 
Class
- getid3_handler_field_sample_rate
 - Render a field as a readable value in hours, minutes, and seconds.
 
Code
function render($values) {
  $value = $values->{$this->field_alias};
  // Check to see if hiding should happen before adding prefix and suffix.
  if ($this->options['hide_empty'] && empty($value) && ($value !== 0 || $this->options['empty_zero'])) {
    return '';
  }
  switch ($this->options['format']) {
    case 'raw':
      $output = $value;
      break;
    default:
      $output = theme('getid3_sample_rate', array(
        'sample_rate' => $value,
      ));
  }
  return check_plain($this->options['prefix']) . $output . check_plain($this->options['suffix']);
}