You are here

function views_handler_field_fontyourface_font::render in @font-your-face 6.2

Same name and namespace in other branches
  1. 7.2 modules/fontyourface_ui/views/views_handler_field_fontyourface_font.inc \views_handler_field_fontyourface_font::render()
  2. 7 views/views_handler_field_fontyourface_font.inc \views_handler_field_fontyourface_font::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/build/themes/fontyourface/edit/' . $values->{$this->aliases['fid']} . '?' . $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});
}