You are here

function views_plugin_style_galleria::render in Galleria 7

Render the display in this style.

Overrides views_plugin_style::render

File

includes/views_plugin_style_galleria.inc, line 76
Galleria style plugin for the Views module.

Class

views_plugin_style_galleria
Implements a style type plugin for the Views module.

Code

function render() {
  $image_field = $this
    ->find_image_field();
  if ($image_field === FALSE) {
    drupal_set_message(t('Style @style requires an image field to be added.', array(
      '@style' => $this->definition['title'],
    )), 'error');
    return;
  }

  // Group the rows according to the grouping field, if specified.
  $sets = $this
    ->render_grouping($this->view->result, $this->options['grouping']);

  // Render each group separately and concatenate.
  $output = '';
  foreach ($sets as $title => $rows) {
    $output .= theme($this
      ->theme_functions(), array(
      'view' => $this->view,
      'options' => $this->options,
      'img_field_name' => $image_field,
      'rows' => $rows,
      'title' => $title,
    ));
  }
  return $output;
}