You are here

protected function EntityPager::getResultRow in Entity Pager 8

Same name and namespace in other branches
  1. 2.0.x src/EntityPager.php \Drupal\entity_pager\EntityPager::getResultRow()

Returns the result row at the index specified.

Parameters

int $index: The index of the result row to return from the view.

Return value

\Drupal\views\ResultRow|null The result row, or NULL.

1 call to EntityPager::getResultRow()
EntityPager::getLink in src/EntityPager.php
Returns an Entity pager link.

File

src/EntityPager.php, line 163

Class

EntityPager
Entity pager object.

Namespace

Drupal\entity_pager

Code

protected function getResultRow($index) {
  $result_row = NULL;
  if (isset($this->view->result[$index])) {
    $result_row = $this->view->result[$index];
  }
  elseif ($this->options['circular_paging']) {
    $result_row = $index < 0 ? $this->view->result[count($this->view->result) - 1] : $this->view->result[0];
  }
  return $result_row;
}