mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix: Fix wrong repository.
This commit is contained in:
parent
5a6a15a351
commit
693b59c484
@ -7,6 +7,7 @@ namespace Chill\ActivityBundle\Controller;
|
||||
use Chill\ActivityBundle\Entity\ActivityReason;
|
||||
use Chill\ActivityBundle\Repository\ActivityACLAwareRepositoryInterface;
|
||||
use Chill\ActivityBundle\Repository\ActivityRepository;
|
||||
use Chill\ActivityBundle\Repository\ActivityTypeCategoryRepository;
|
||||
use Chill\ActivityBundle\Repository\ActivityTypeRepository;
|
||||
use Chill\ActivityBundle\Security\Authorization\ActivityVoter;
|
||||
use Chill\MainBundle\Repository\LocationRepository;
|
||||
@ -54,9 +55,12 @@ final class ActivityController extends AbstractController
|
||||
|
||||
private AccompanyingPeriodRepository $accompanyingPeriodRepository;
|
||||
|
||||
private ActivityTypeCategoryRepository $activityTypeCategoryRepository;
|
||||
|
||||
public function __construct(
|
||||
ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
|
||||
ActivityTypeRepository $activityTypeRepository,
|
||||
ActivityTypeCategoryRepository $activityTypeCategoryRepository,
|
||||
PersonRepository $personRepository,
|
||||
ThirdPartyRepository $thirdPartyRepository,
|
||||
LocationRepository $locationRepository,
|
||||
@ -69,6 +73,7 @@ final class ActivityController extends AbstractController
|
||||
) {
|
||||
$this->activityACLAwareRepository = $activityACLAwareRepository;
|
||||
$this->activityTypeRepository = $activityTypeRepository;
|
||||
$this->activityTypeCategoryRepository = $activityTypeCategoryRepository;
|
||||
$this->personRepository = $personRepository;
|
||||
$this->thirdPartyRepository = $thirdPartyRepository;
|
||||
$this->locationRepository = $locationRepository;
|
||||
@ -136,10 +141,17 @@ final class ActivityController extends AbstractController
|
||||
|
||||
$data = [];
|
||||
|
||||
$activityTypeCategories = $this->activityTypeRepository->findBy(['active' => true], ['ordering' => 'ASC']);
|
||||
$activityTypeCategories = $this
|
||||
->activityTypeCategoryRepository
|
||||
->findBy(['active' => true], ['ordering' => 'ASC']);
|
||||
|
||||
foreach ($activityTypeCategories as $activityTypeCategory) {
|
||||
$activityTypes = $this->activityTypeRepository->findBy(['active' => true, 'category' => $activityTypeCategory], ['ordering' => 'ASC']);
|
||||
$activityTypes = $this
|
||||
->activityTypeRepository
|
||||
->findBy(
|
||||
['active' => true, 'category' => $activityTypeCategory],
|
||||
['ordering' => 'ASC']
|
||||
);
|
||||
|
||||
$data[] = [
|
||||
'activityTypeCategory' => $activityTypeCategory,
|
||||
|
Loading…
x
Reference in New Issue
Block a user