mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
refactor naming ReferralsAvailable => referralSuggestion
This commit is contained in:
@@ -4,7 +4,7 @@ namespace Chill\PersonBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Chill\MainBundle\Serializer\Model\Collection;
|
||||
use Chill\PersonBundle\AccompanyingPeriod\Suggestion\ReferralAvailableInterface;
|
||||
use Chill\PersonBundle\AccompanyingPeriod\Suggestion\ReferralsSuggestionInterface;
|
||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@@ -34,13 +34,13 @@ class AccompanyingCourseApiController extends ApiController
|
||||
|
||||
private Registry $registry;
|
||||
|
||||
private ReferralAvailableInterface $referralAvailable;
|
||||
private ReferralsSuggestionInterface $referralAvailable;
|
||||
|
||||
public function __construct(
|
||||
EventDispatcherInterface $eventDispatcher,
|
||||
ValidatorInterface $validator,
|
||||
Registry $registry,
|
||||
ReferralAvailableInterface $referralAvailable
|
||||
ReferralsSuggestionInterface $referralAvailable
|
||||
) {
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->validator = $validator;
|
||||
@@ -209,11 +209,11 @@ $workflow = $this->registry->get($accompanyingPeriod);
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $period);
|
||||
|
||||
$total = $this->referralAvailable->countReferralAvailable($period);
|
||||
$total = $this->referralAvailable->countReferralSuggested($period);
|
||||
$paginator = $this->getPaginatorFactory()->create($total);
|
||||
|
||||
if (0 < $total) {
|
||||
$users = $this->referralAvailable->findReferralAvailable($period, $paginator->getItemsPerPage(),
|
||||
$users = $this->referralAvailable->findReferralSuggested($period, $paginator->getItemsPerPage(),
|
||||
$paginator->getCurrentPageFirstItemNumber());
|
||||
} else {
|
||||
$users = [];
|
||||
|
Reference in New Issue
Block a user