fixes to make count social actions export work

This commit is contained in:
2022-07-26 11:22:17 +02:00
parent a06a2c9592
commit 5ba8c4babc
3 changed files with 8 additions and 4 deletions

View File

@@ -21,8 +21,9 @@ use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use LogicException;
use Symfony\Component\Security\Core\Role\Role;
class CountSocialAction implements ExportInterface, GroupedExportInterface
class CountSocialActions implements ExportInterface, GroupedExportInterface
{
protected SocialActionRepository $socialActionRepository;
@@ -90,9 +91,10 @@ class CountSocialAction implements ExportInterface, GroupedExportInterface
return $qb;
}
public function requiredRole(): string
public function requiredRole(): Role
{
return AccompanyingPeriodVoter::STATS;
//TODO change to string, but changes needed also in exportManager and possibly other locations.
return new Role(AccompanyingPeriodVoter::STATS);
}
public function supportsModifiers(): array