function Sql::getFieldAlias

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getFieldAlias()
  2. 8.9.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getFieldAlias()
  3. 10 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getFieldAlias()

Returns the alias for the given field added to $table.

@access protected

See also

\Drupal\views\Plugin\views\query\Sql::addField

1 call to Sql::getFieldAlias()
Sql::loadEntities in core/modules/views/src/Plugin/views/query/Sql.php
Loads all entities contained in the passed-in $results.

File

core/modules/views/src/Plugin/views/query/Sql.php, line 1096

Class

Sql
Views query plugin for an SQL query.

Namespace

Drupal\views\Plugin\views\query

Code

protected function getFieldAlias($table_alias, $field) {
    return $this->fieldAliases[$table_alias][$field] ?? FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.