mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 12:03:48 +00:00
[person][export] Fixed: rename the alias for accompanying_period
to acp
in filter associated with person
This commit is contained in:
@@ -25,13 +25,17 @@ class AbstractAccompanyingPeriodExportElement
|
||||
*/
|
||||
protected function addJoinAccompanyingPeriod(QueryBuilder $query): void
|
||||
{
|
||||
if (false === $this->havingAccompanyingPeriodInJoin($query)) {
|
||||
if (false === in_array('person', $query->getAllAliases(), true)) {
|
||||
throw new LogicException("the alias 'person' does not exists in "
|
||||
. 'query builder');
|
||||
}
|
||||
if (false === in_array('person', $query->getAllAliases(), true)) {
|
||||
throw new LogicException("the alias 'person' does not exists in "
|
||||
. 'query builder');
|
||||
}
|
||||
|
||||
$query->join('person.accompanyingPeriods', 'accompanying_period');
|
||||
if (!in_array('acppart', $query->getAllAliases(), true)) {
|
||||
$query->join('person.accompanyingPeriodParticipations', 'acppart');
|
||||
}
|
||||
|
||||
if (!in_array('acp', $query->getAllAliases(), true)) {
|
||||
$query->join('acppart.accompanyingPeriod', 'acp');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +44,6 @@ class AbstractAccompanyingPeriodExportElement
|
||||
*/
|
||||
protected function havingAccompanyingPeriodInJoin(QueryBuilder $query): bool
|
||||
{
|
||||
$joins = $query->getDQLPart('join') ?? [];
|
||||
|
||||
return in_array('accompanying_period', $query->getAllAliases(), true);
|
||||
return in_array('acp', $query->getAllAliases(), true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user