You are here

function image_attach_views_handler_field_attached_images::render in Image 6

Render the field.

Overrides image_handler_field_image_node_image::render

File

contrib/image_attach/image_attach_views_handler_field_attached_images.inc, line 95

Class

image_attach_views_handler_field_attached_images
Field handler to display the attached images on a node.

Code

function render($values) {
  if (isset($values->image_attach_iids[$this->handler_key])) {

    // Images need to loaded as full nodes to check node_access() for each of them.
    foreach ($values->image_attach_iids[$this->handler_key] as $iid) {
      $image_nodes[$iid] = node_load($iid);
    }
    $options = array(
      'size' => $this->options['image_derivative'],
      'link' => $this->options['as_link'],
    );
    $output = theme('image_attach_attached_images', $values->{$this->aliases['image_attach_nid']}, $image_nodes, $options);
    return $output;
  }
}