function flexslider_views_plugin_style_flexslider::render in Flex Slider 7
Same name and namespace in other branches
- 7.2 flexslider_views/flexslider_views_plugin_style_flexslider.inc \flexslider_views_plugin_style_flexslider::render()
Render the display in this style.
Overrides views_plugin_style::render
File
- flexslider_views/
flexslider_views_plugin_style_flexslider.inc, line 100 - flexslider style plugin for the Views module.
Class
- flexslider_views_plugin_style_flexslider
- 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;
}