public function Ical::render in Views iCal 8
Render the display in this style.
Overrides StylePluginBase::render
File
- src/
Plugin/ views/ style/ Ical.php, line 51
Class
- Ical
- Style plugin to render an iCal feed.
Namespace
Drupal\views_ical\Plugin\views\styleCode
public function render() {
if (empty($this->view->rowPlugin)) {
trigger_error('Drupal\\views_ical\\Plugin\\views\\style\\Ical: Missing row plugin', E_WARNING);
return [];
}
// Run the parent render to
$parent_render = parent::render();
$rows = [];
foreach ($this->view->result as $row_index => $row) {
$this->view->row_index = $row_index;
$rows[] = $this->view->rowPlugin
->render($row);
}
$build = [
'#theme' => $this
->themeFunctions(),
'#view' => $this->view,
'#options' => $this->options,
'#rows' => $rows,
];
unset($this->view->row_index);
return $parent_render;
}