4 * Contains the default style plugin.
8 * Default style plugin to render rows one after another with no
11 * @ingroup views_style_plugins
13 class views_content_plugin_style_ctools_context extends views_plugin_style {
17 * Render the display in this style.
20 if (!empty($this->view->display_handler->previewing)) {
21 return parent::render();
24 $this->rows = array();
25 $this->groups = array();
26 if ($this->uses_row_plugin() && empty($this->row_plugin)) {
27 vpr('views_plugin_style_default: Missing row plugin');
31 // Some engines like solr key results on ids, but rendering really expects
32 // things to be keyed exclusively by row index. Using array_values()
34 $this->view->result = array_values($this->view->result);
36 // Group the rows according to the grouping field, if specified.
37 $sets = $this->render_grouping($this->view->result, $this->options['grouping']);
39 // Render each group separately and concatenate. Plugins may override this
40 // method if they wish some other way of handling grouping.
42 foreach ($sets as $title => $records) {
43 foreach ($records as $row_index => $row) {
44 $this->view->row_index = $row_index;
45 $this->rows[$row_index] = $this->row_plugin->render($row);
46 $this->groups[$row_index] = $title;
49 unset($this->view->row_index);