public function PartyQuery::__construct in Party 7
Same name and namespace in other branches
- 8.2 includes/party.extender.inc \PartyQuery::__construct()
Attempt to sniff out the party base table.
Overrides SelectQueryExtender::__construct
File
- includes/
party.extender.inc, line 48 - Class to aid querying parties and attached entities.
Class
- PartyQuery
- Query extender for party attached entities.
Code
public function __construct(SelectQueryInterface $query, DatabaseConnection $connection) {
parent::__construct($query, $connection);
$tables = $this
->getTables();
foreach ($tables as $alias => $table) {
if ($table['table'] == 'party') {
$this->base_alias = $alias;
break;
}
}
}