You are here

function TableRowSpan::renderGroupingSets in Views Table Rowspan 8

@inheritdoc

Overrides StylePluginBase::renderGroupingSets

File

src/Plugin/views/style/TableRowSpan.php, line 49

Class

TableRowSpan
Style plugin to merge duplicate row in table.

Namespace

Drupal\views_table_rowspan\Plugin\views\style

Code

function renderGroupingSets($sets) {
  if (!empty($this->options['grouping']) && !empty($this->options['rowspan'])) {
    $rows = $this
      ->getColSpanRows($sets);
    $sets = [
      [
        'group' => '',
        'rows' => $rows,
      ],
    ];

    // Convert sets to one group.
    $this->options['grouping'] = [];
  }
  return parent::renderGroupingSets($sets);
}