protected Query::getSqlField($field, $langcode)
Constructs a select expression for a given field and language.
Parameters
string $field: The name of the field being queried.
string $langcode: The language code of the field.
Return value
string An expression that will select the given field for the given language in a SELECT query, such as 'base_table.id'.
File
- core/lib/Drupal/Core/Entity/Query/Sql/Query.php, line 265
Class
- Query
- The SQL storage entity query class.
Namespace
Drupal\Core\Entity\Query\Sql
Code
1 2 3 4 5 6 7 8 9 10 11 12 | protected function getSqlField( $field , $langcode ) { if (!isset( $this ->tables)) { $this ->tables = $this ->getTables( $this ->sqlQuery); } $base_property = "base_table.$field" ; if (isset( $this ->sqlFields[ $base_property ])) { return $base_property ; } else { return $this ->tables->addField( $field , 'LEFT' , $langcode ); } } |
Please login to continue.