You are here

protected function Sql::getAllEntities in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getAllEntities()

Gets all the involved entities of the view.

Return value

\Drupal\Core\Entity\EntityInterface[]

2 calls to Sql::getAllEntities()
Sql::getCacheMaxAge in core/modules/views/src/Plugin/views/query/Sql.php
The maximum age for which this object may be cached.
Sql::getCacheTags in core/modules/views/src/Plugin/views/query/Sql.php
The cache tags associated with this object.

File

core/modules/views/src/Plugin/views/query/Sql.php, line 1581
Contains \Drupal\views\Plugin\views\query\Sql.

Class

Sql
Views query plugin for an SQL query.

Namespace

Drupal\views\Plugin\views\query

Code

protected function getAllEntities() {
  $entities = [];
  foreach ($this->view->result as $row) {
    if ($row->_entity) {
      $entities[] = $row->_entity;
    }
    foreach ($row->_relationship_entities as $entity) {
      $entities[] = $entity;
    }
  }
  return $entities;
}