You are here

function image_gallery_handler_field_gallery_cover_thumbnail::render in Image 6

Same name and namespace in other branches
  1. 7 contrib/image_gallery/views/image_gallery_handler_field_gallery_cover_thumbnail.inc \image_gallery_handler_field_gallery_cover_thumbnail::render()

Returns field html.

Overrides image_gallery_handler_field_gallery_cover::render

File

contrib/image_gallery/views/image_gallery_handler_field_gallery_cover_thumbnail.inc, line 53

Class

image_gallery_handler_field_gallery_cover_thumbnail
Field handler for gallery cover node image.

Code

function render($values) {
  $nid = $this
    ->get_cover_node_nid($values);
  $latest_node = node_load($nid);
  $output = image_display($latest_node, $this->options['image_derivative']);
  $output = $this
    ->render_link($output, $values);

  // Wrap a common class so the thumbnail can be style no matter what field.
  // TODO: theme function?
  return '<span class="image-gallery-view-cover-thumbnail">' . $output . '</span>';
}