You are here

protected function VboExportBase::getRows in VBO export 8.3

Get rows from views results.

Return value

array An array of rows in a single batch prepared for theming.

1 call to VboExportBase::getRows()
VboExportBase::executeMultiple in src/Plugin/Action/VboExportBase.php
Execute multiple handler.

File

src/Plugin/Action/VboExportBase.php, line 210

Class

VboExportBase
Base class for export actions.

Namespace

Drupal\vbo_export\Plugin\Action

Code

protected function getRows() {

  // Render rows.
  $this->view
    ->render($this->view->current_display);
  $index = $this->context['sandbox']['processed'];
  $rows = [];
  foreach (array_keys($this->view->result) as $num) {
    foreach (array_keys($this
      ->getHeader()) as $field_id) {
      $rows[$index][$field_id] = (string) $this->view->style_plugin
        ->getField($num, $field_id);
    }
    $index++;
  }
  return $rows;
}