You are here

function views_handler_field_quotes::render in Quotes 6

Same name and namespace in other branches
  1. 7 views_handler_field_quotes.inc \views_handler_field_quotes::render()

Render field output to the browser.

File

./views_handler_field_quotes.inc, line 42
Provide views data and handlers for quotes.module

Class

views_handler_field_quotes
Field handler to provide an embedded image.

Code

function render($values) {

  //   drupal_set_message(print_r($values, true));
  $author = $values->{$this->field_alias};
  $type = $this->options['author_link'];

  //   drupal_set_message("\$this->field_alias='$this->field_alias', author='$author', type='$type'.");
  switch ($type) {
    case 'author':
      return l($author, 'quotes/author/' . check_plain($author), array(
        'attributes' => array(
          'rel' => 'tag',
        ),
      ));
    default:

      // Also 'text'
      return check_plain($author);
  }
}