function FormatName::render in Views (for Drupal 7) 8.3
Render the field.
Parameters
$values: The values retrieved from the database.
Overrides FieldPluginBase::render
File
- lib/
Views/ filter/ Plugin/ views/ field/ FormatName.php, line 41 - Definition of Views\filter\Plugin\views\field\FormatName.
Class
- FormatName
- Field handler to output the name of an input format.
Namespace
Views\filter\Plugin\views\fieldCode
function render($values) {
$format_name = $this
->get_value($values, 'name');
if (!$format_name) {
// Default or invalid input format.
// filter_formats() will reliably return the default format even if the
// current user is unprivileged.
$format = filter_formats(filter_default_format());
return $this
->sanitizeValue($format->name);
}
return $this
->sanitizeValue($format_name);
}