You are here

protected function Xml::reIndexResults in Views XML Backend 8

Re-indexes the results of a view.

Parameters

\Drupal\views\ViewExecutable $view: The view to re-index.

2 calls to Xml::reIndexResults()
Xml::doExecute in src/Plugin/views/query/Xml.php
Performs the actual view execution.
Xml::executeSorts in src/Plugin/views/query/Xml.php
Executes all added sorts to a view.

File

src/Plugin/views/query/Xml.php, line 792
Contains \Drupal\views_xml_backend\Plugin\views\query\Xml.

Class

Xml
Views query plugin for an XML query.

Namespace

Drupal\views_xml_backend\Plugin\views\query

Code

protected function reIndexResults(ViewExecutable $view) {
  $index = 0;
  foreach ($view->result as $row) {
    $row->index = $index++;
  }
}