You are here

function views_handler_field_flipping_book::render_link in Flipping Book 7

Render whatever the data is as a link to the flipping_book.

Data should be made XSS safe prior to calling this function.

1 call to views_handler_field_flipping_book::render_link()
views_handler_field_flipping_book::render in views/views_handler_field_flipping_book.inc
Render the field.

File

views/views_handler_field_flipping_book.inc, line 63
Contains the basic 'flipping_book' field handler.

Class

views_handler_field_flipping_book
Field handler to provide simple renderer that allows linking to a flipping_book. Definition terms:

Code

function render_link($data, $values) {
  if (!empty($this->options['link_to_flipping_book']) && !empty($this->additional_fields['fbid'])) {
    if ($data !== NULL && $data !== '') {
      $this->options['alter']['make_link'] = TRUE;
      $flipping_book = flipping_book_load($this
        ->get_value($values, 'fbid'));
      $this->options['alter']['path'] = $flipping_book->url;
    }
    else {
      $this->options['alter']['make_link'] = FALSE;
    }
  }
  return $data;
}