function TimeInterval::render in Views (for Drupal 7) 8.3
Render the field.
Parameters
$values: The values retrieved from the database.
Overrides FieldPluginBase::render
File
- lib/
Drupal/ views/ Plugin/ views/ field/ TimeInterval.php, line 42 - Definition of Drupal\views\Plugin\views\field\TimeInterval.
Class
- TimeInterval
- A handler to provide proper displays for time intervals.
Namespace
Drupal\views\Plugin\views\fieldCode
function render($values) {
$value = $values->{$this->field_alias};
return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2);
}