public function Jssor::render in Jssor Slider 8
Render a row object. This usually passes through to a theme template of some form, but not always.
Parameters
object $row: A single row of the query result, so an element of $view->result.
Return value
string The rendered output of a single row, used by the style plugin.
Overrides RowPluginBase::render
File
- src/
Plugin/ views/ row/ Jssor.php, line 269 - Definition of Drupal\jssor\Plugin\views\row\Jssor.
Class
- Jssor
- Row handler plugin for displaying search results.
Namespace
Drupal\jssor\Plugin\views\rowCode
public function render($row) {
static $row_index;
if (!isset($row_index)) {
$row_index = 0;
}
else {
$row_index++;
}
// Create the RSS item object.
$item = new \stdClass();
$item->image = $this
->getField($row_index, $this->options['image_options']);
$item->caption = $this
->getField($row_index, $this->options['caption_options']);
$build = array(
'#theme' => $this
->themeFunctions(),
'#view' => $this->view,
'#options' => $this->options,
'#row' => $item,
);
return $build;
}