function Sql::getAllEntities
Same name in other branches
- 9 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getAllEntities()
- 10 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getAllEntities()
- 11.x 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 1701
Class
- Sql
- Views query plugin for an SQL query.
Namespace
Drupal\views\Plugin\views\queryCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.