You are here

function views_handler_field_fontyourface_foundry::render in @font-your-face 7

Same name and namespace in other branches
  1. 6.2 views/views_handler_field_fontyourface_foundry.inc \views_handler_field_fontyourface_foundry::render()
  2. 7.2 modules/fontyourface_ui/views/views_handler_field_fontyourface_foundry.inc \views_handler_field_fontyourface_foundry::render()

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

views/views_handler_field_fontyourface_foundry.inc, line 54
Views handler.

Class

views_handler_field_fontyourface_foundry
Field handler to provide simple renderer that allows linking to a foundry.

Code

function render($values) {
  if ($this->options['link_to_foundry'] == 'foundry_url') {
    $foundry_url = $values->{$this->aliases['foundry_url']};
    if ($foundry_url != '') {
      $this->options['alter']['make_link'] = TRUE;
      $this->options['alter']['path'] = $foundry_url;
    }
    else {
      $this->options['alter']['make_link'] = FALSE;
    }

    // else
  }

  // if
  return check_plain($values->{$this->field_alias});
}