fix translation in exports / aggregator.

The activity type aggregator is shown.
This commit is contained in:
2018-10-05 11:01:00 +02:00
parent 4163f7a6fb
commit fad1821c2f
4 changed files with 11 additions and 30 deletions

View File

@@ -63,32 +63,6 @@ class ActivityTypeAggregator implements AggregatorInterface
// add select element
$qb->addSelect(sprintf('IDENTITY(activity.type) AS %s', self::KEY));
// make a jointure only if needed
/*$join = $qb->getDQLPart('join');
if (
(array_key_exists('activity', $join)
&&
!$this->checkJoinAlreadyDefined($join['activity'], 'reasons')
)
OR
(! array_key_exists('activity', $join))
) {
$qb->add(
'join',
array('activity' =>
new Join(Join::INNER_JOIN, 'activity.reasons', 'reasons')
),
true);
}
// join category if necessary
if ($alias === 'activity_categories_id') {
// add join only if needed
if (!$this->checkJoinAlreadyDefined($qb->getDQLPart('join')['activity'], 'category')) {
$qb->join('reasons.category', 'category');
}
}*/
// add the "group by" part
$groupBy = $qb->addGroupBy(self::KEY);
}

View File

@@ -75,9 +75,7 @@ class CountActivity implements ExportInterface
->from('ChillActivityBundle:Activity', 'activity')
;
if (in_array('person', $requiredModifiers)) {
$qb->join('activity.person', 'person');
}
$qb->join('activity.person', 'person');
$qb->where($qb->expr()->in('person.center', ':centers'))
->setParameter('centers', $centers)