mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
80 lines
2.0 KiB
PHP
80 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace Chill\ActivityBundle\Export\Export\LinkedToACP;
|
|
|
|
use Chill\ActivityBundle\Export\Declarations;
|
|
use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter;
|
|
use Chill\MainBundle\Export\ExportInterface;
|
|
use Chill\MainBundle\Export\GroupedExportInterface;
|
|
use Closure;
|
|
use Doctrine\ORM\QueryBuilder;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\Security\Core\Role\Role;
|
|
|
|
class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterface
|
|
{
|
|
public function buildForm(FormBuilderInterface $builder)
|
|
{
|
|
// TODO: Implement buildForm() method.
|
|
}
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return 'Average activity linked to an accompanying period visit duration';
|
|
}
|
|
|
|
public function getAllowedFormattersTypes(): array
|
|
{
|
|
return [FormatterInterface::TYPE_TABULAR];
|
|
}
|
|
|
|
public function getDescription(): string
|
|
{
|
|
return 'Average activities linked to an accompanying period visit duration by various parameters.';
|
|
}
|
|
|
|
public function getLabels($key, array $values, $data)
|
|
{
|
|
// TODO: Implement getLabels() method.
|
|
}
|
|
|
|
public function getQueryKeys($data): array
|
|
{
|
|
return ['export_avg_activity_visit_duration'];
|
|
}
|
|
|
|
public function getResult($qb, $data)
|
|
{
|
|
return $qb->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
|
}
|
|
|
|
public function getType(): string
|
|
{
|
|
return Declarations::ACTIVITY;
|
|
}
|
|
|
|
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
|
{
|
|
// TODO: Implement initiateQuery() method.
|
|
}
|
|
|
|
public function requiredRole(): Role
|
|
{
|
|
return new Role(ActivityStatsVoter::STATS);
|
|
}
|
|
|
|
public function supportsModifiers(): array
|
|
{
|
|
return [
|
|
Declarations::ACTIVITY,
|
|
Declarations::ACTIVITY_ACP,
|
|
//PersonDeclarations::ACP_TYPE,
|
|
];
|
|
}
|
|
|
|
public function getGroup(): string
|
|
{
|
|
return 'Exports of activities linked to an accompanying period';
|
|
}
|
|
|
|
} |