refactor naming ReferralsAvailable => referralSuggestion

This commit is contained in:
2021-10-20 20:49:44 +02:00
parent 3f138dc152
commit 02ca9add52
5 changed files with 36 additions and 41 deletions

View File

@@ -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 = [];