function views_handler_field_fontyourface_font::render in @font-your-face 7
Same name and namespace in other branches
- 6.2 views/views_handler_field_fontyourface_font.inc \views_handler_field_fontyourface_font::render()
- 7.2 modules/fontyourface_ui/views/views_handler_field_fontyourface_font.inc \views_handler_field_fontyourface_font::render()
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- views/
views_handler_field_fontyourface_font.inc, line 65 - Views handler.
Class
- views_handler_field_fontyourface_font
- Field handler to provide simple renderer that allows linking to a font.
Code
function render($values) {
if ($this->options['link_to_font'] == 'edit') {
$destination = drupal_get_destination();
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = 'admin/appearance/fontyourface/edit/' . $values->{$this->aliases['fid']} . '?' . drupal_http_build_query($destination);
}
// if
if ($this->options['display_as'] == 'preview') {
$font = fontyourface_get_font($values->fid);
return fontyourface_preview($font, $values->{$this->field_alias});
}
// if
return check_plain($values->{$this->field_alias});
}