You are here

protected function EntityPager::getResultEntity in Entity Pager 8

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

Get the entity from the current views row.

Parameters

\Drupal\views\ResultRow $row: The views result row object.

Return value

\Drupal\Core\Entity\EntityInterface The content entity from the result.

2 calls to EntityPager::getResultEntity()
EntityPager::getCurrentRow in src/EntityPager.php
Returns the currently active row from the view results.
EntityPager::getLink in src/EntityPager.php
Returns an Entity pager link.

File

src/EntityPager.php, line 300

Class

EntityPager
Entity pager object.

Namespace

Drupal\entity_pager

Code

protected function getResultEntity(ResultRow $row) {
  return $this->options['relationship'] ? $row->_relationship_entities[$this->options['relationship']] : $row->_entity;
}