Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Sql.php

function 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 1746

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal