mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
aggregators added - monthYearAggregator not finished
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\CalendarBundle\Export\Aggregator;
|
||||
|
||||
use Chill\CalendarBundle\Export\Declarations;
|
||||
use Chill\MainBundle\Export\AggregatorInterface;
|
||||
use Closure;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class MonthYearAggregator implements AggregatorInterface
|
||||
{
|
||||
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return ['monty_year_aggregator'];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data): Closure
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// No form needed
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return 'Group by month and year';
|
||||
}
|
||||
|
||||
public function addRole(): ?Role
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
// TODO: Implement alterQuery() method.
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
{
|
||||
return [ Declarations::CALENDAR_TYPE ];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user