mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
SentReceivedAggregator (in activity)
This commit is contained in:
parent
f8b5078997
commit
ed04c276c2
@ -25,8 +25,8 @@ class SentReceivedAggregator implements AggregatorInterface
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->addSelect('AS activity_sent_received_aggregator')
|
||||
->addGroupBy('activity_sent_received_aggregator');
|
||||
$qb->addSelect('activity.sentReceived AS activity_sentreceived_aggregator')
|
||||
->addGroupBy('activity_sentreceived_aggregator');
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
@ -45,12 +45,22 @@ class SentReceivedAggregator implements AggregatorInterface
|
||||
if ('_header' === $value) {
|
||||
return '';
|
||||
}
|
||||
switch ($value) {
|
||||
case 'sent':
|
||||
return 'is sent';
|
||||
|
||||
case 'received':
|
||||
return 'is received';
|
||||
|
||||
default:
|
||||
throw new \LogicException(sprintf('The value %s is not valid', $value));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['activity_sent_received_aggregator'];
|
||||
return ['activity_sentreceived_aggregator'];
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
|
@ -59,7 +59,6 @@ class CurrentActionAggregator implements AggregatorInterface
|
||||
default:
|
||||
throw new \LogicException(sprintf('The value %s is not valid', $value));
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user