src/Controller/ProfileListController.php line 1171

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by simpson <simpsonwork@gmail.com>
  4.  * Date: 2019-03-19
  5.  * Time: 22:28
  6.  */
  7. namespace App\Controller;
  8. use App\Bridge\Porpaginas\Doctrine\ORM\FakeORMQueryPage;
  9. use App\Entity\Location\City;
  10. use App\Entity\Location\County;
  11. use App\Entity\Location\District;
  12. use App\Entity\Location\Station;
  13. use App\Entity\Profile\BodyTypes;
  14. use App\Entity\Profile\BreastTypes;
  15. use App\Entity\Profile\Genders;
  16. use App\Entity\Profile\HairColors;
  17. use App\Entity\Profile\Nationalities;
  18. use App\Entity\Profile\PrivateHaircuts;
  19. use App\Entity\Service;
  20. use App\Entity\ServiceGroups;
  21. use App\Entity\TakeOutLocations;
  22. use App\Repository\ServiceRepository;
  23. use App\Repository\StationRepository;
  24. use App\Service\CountryCurrencyResolver;
  25. use App\Service\DefaultCityProvider;
  26. use App\Service\Features;
  27. use App\Service\HomepageCityListingsBlockProvider;
  28. use App\Service\ListingRotationApi;
  29. use App\Service\ListingService;
  30. use App\Service\ProfileList;
  31. use App\Service\ProfileListingRecommendationsFiller;
  32. use App\Service\ProfileListingDataCreator;
  33. use App\Service\ProfileListSpecificationService;
  34. use App\Service\ProfileFilterService;
  35. use App\Service\ProfileTopBoard;
  36. use App\Service\Top100ProfilesService;
  37. use App\Specification\ElasticSearch\ISpecification;
  38. use App\Specification\Profile\ProfileHasApartments;
  39. use App\Specification\Profile\ProfileIdINOrderedByINValues;
  40. use App\Specification\Profile\ProfileIsElite;
  41. use App\Specification\Profile\ProfileIsLocated;
  42. use App\Specification\Profile\ProfileIsProvidingOneOfServices;
  43. use App\Specification\Profile\ProfileIsProvidingTakeOut;
  44. use App\Specification\Profile\ProfileWithBodyType;
  45. use App\Specification\Profile\ProfileWithBreastType;
  46. use App\Specification\Profile\ProfileWithHairColor;
  47. use App\Specification\Profile\ProfileWithNationality;
  48. use App\Specification\Profile\ProfileWithPrivateHaircut;
  49. use Flagception\Bundle\FlagceptionBundle\Annotations\Feature;
  50. use Happyr\DoctrineSpecification\Filter\Filter;
  51. use Happyr\DoctrineSpecification\Logic\OrX;
  52. use Porpaginas\Doctrine\ORM\ORMQueryResult;
  53. use Porpaginas\Page;
  54. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
  55. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Entity;
  56. use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
  57. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  58. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
  59. use Symfony\Component\HttpFoundation\Request;
  60. use Happyr\DoctrineSpecification\Spec;
  61. use Symfony\Component\HttpFoundation\RequestStack;
  62. use Symfony\Component\HttpFoundation\Response;
  63. /**
  64.  * @see \App\Console\Export\ExportRotationListingsConfigCommand for listing API endpoints
  65.  */
  66. #[Cache(maxage60, public: true)]
  67. class ProfileListController extends AbstractController
  68. {
  69.     use ExtendedPaginationTrait;
  70.     use SpecTrait;
  71.     use ProfileMinPriceTrait;
  72.     use ResponseTrait;
  73.     const ENTRIES_ON_PAGE 36;
  74.     const RESULT_SOURCE_COUNTY 'county';
  75.     const RESULT_SOURCE_DISTRICT 'district';
  76.     const RESULT_SOURCE_STATION 'station';
  77.     const RESULT_SOURCE_APPROVED 'approved';
  78.     const RESULT_SOURCE_WITH_COMMENTS 'with_comments';
  79.     const RESULT_SOURCE_WITH_VIDEO 'with_video';
  80.     const RESULT_SOURCE_WITH_SELFIE 'with_selfie';
  81.     const RESULT_SOURCE_TOP_100 'top_100';
  82.     const RESULT_SOURCE_ELITE 'elite';
  83.     const RESULT_SOURCE_MASSEURS 'masseurs';
  84.     const RESULT_SOURCE_MASSAGE_SERVICE 'massage_service';
  85.     const RESULT_SOURCE_BY_PARAMS 'by_params';
  86.     const RESULT_SOURCE_SERVICE 'service';
  87.     const RESULT_SOURCE_CITY 'city';
  88.     const RESULT_SOURCE_COUNTRY 'country';
  89.     const RESULT_SOURCE_WITH_WHATSAPP 'with_whatsapp';
  90.     const RESULT_SOURCE_WITH_TELEGRAM 'with_telegram';
  91.     const RESULT_SOURCE_EIGHTEEN_YEARS_OLD 'eighteen_years_old';
  92.     const RESULT_SOURCE_BIG_ASS 'big_ass';
  93.     const RESULT_SOURCE_WITH_TATTOO 'with_tattoo';
  94.     const RESULT_SOURCE_WITH_PIERCING 'with_piercing';
  95.     const RESULT_SOURCE_ROUND_THE_CLOCK 'round_the_clock';
  96.     const RESULT_SOURCE_FOR_TWO_HOURS 'for_two_hours';
  97.     const RESULT_SOURCE_FOR_HOUR 'for_hour';
  98.     const RESULT_SOURCE_EXPRESS_PROGRAM 'express_program';
  99.     const RESULT_SOURCE_EROMASSAGE 'eromassage';
  100.     const RESULT_SOURCE_VERIFIED 'verified';
  101.     const RESULT_SOURCE_CHEAP 'cheap';
  102.     const RESULT_SOURCE_MATURE 'mature';
  103.     const RESULT_SOURCE_UZBEK 'uzbek';
  104.     private ?string $source null;
  105.     public function __construct(
  106.         private RequestStack $requestStack,
  107.         private ProfileList                     $profileList,
  108.         private CountryCurrencyResolver         $countryCurrencyResolver,
  109.         private ServiceRepository               $serviceRepository,
  110.         private ListingService                  $listingService,
  111.         private Features                        $features,
  112.         private ProfileFilterService            $profilesFilterService,
  113.         private ProfileListSpecificationService $profileListSpecificationService,
  114.         private ProfileListingDataCreator       $profileListingDataCreator,
  115.         private Top100ProfilesService           $top100ProfilesService,
  116.         private ParameterBagInterface           $parameterBag,
  117.         private ListingRotationApi              $listingRotationApi,
  118.         private ProfileTopBoard                 $profileTopBoard,
  119.         private HomepageCityListingsBlockProvider $homepageCityListingsBlockProvider,
  120.         private ProfileListingRecommendationsFiller $profileListingRecommendationsFiller,
  121.     ) {}
  122.     /**
  123.      * @Feature("has_masseurs")
  124.      */
  125.     #[ParamConverter("city"converter"city_converter")]
  126.     public function listForMasseur(City $cityServiceRepository $serviceRepository): Response
  127.     {
  128.         $specs $this->profileListSpecificationService->listForMasseur($city);
  129.         $response = new Response();
  130.         $massageGroupServices $serviceRepository->findBy(['group' => ServiceGroups::MASSAGE]);
  131.         $alternativeSpec $this->getORSpecForItemsArray([$massageGroupServices], function($item): ProfileIsProvidingOneOfServices {
  132.             return new ProfileIsProvidingOneOfServices($item);
  133.         });
  134.         $result $this->paginatedListing($city'/city/{city}/masseur', ['city' => $city->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_MASSAGE_SERVICE$response);
  135.         return $this->render('ProfileList/list.html.twig', [
  136.             'profiles' => $result,
  137.             'source' => $this->source,
  138.             'source_default' => self::RESULT_SOURCE_MASSEURS,
  139.             'recommendationSpec' => $specs->recommendationSpec(),
  140.         ], response$response);
  141.     }
  142.     /**
  143.      * @Feature("extra_category_big_ass")
  144.      */
  145.     #[ParamConverter("city"converter"city_converter")]
  146.     public function listBigAss(Request $requestCity $city): Response
  147.     {
  148.         $specs $this->profileListSpecificationService->listBigAss();
  149.         $response = new Response();
  150.         $result $this->paginatedListing($city'/city/{city}/category/big_ass', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  151.         return $this->render('ProfileList/list.html.twig', [
  152.             'profiles' => $result,
  153.             'source' => $this->source,
  154.             'source_default' => self::RESULT_SOURCE_BIG_ASS,
  155.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  156.                 'city' => $city->getUriIdentity(),
  157.                 'page' => $this->getCurrentPageNumber(),
  158.             ]),
  159.             'recommendationSpec' => $specs->recommendationSpec(),
  160.         ], response$response);
  161.     }
  162.     public function listByDefaultCity(ParameterBagInterface $parameterBagRequest $request): Response
  163.     {
  164.         $controller get_class($this).'::listByCity';
  165.         $path = [
  166.             'city' => $parameterBag->get('default_city'),
  167.             'subRequest' => true,
  168.         ];
  169.         //чтобы в обработчике можно было понять, по какому роуту зашли
  170.         $request->request->set('_route''profile_list.list_by_city');
  171.         return $this->forward($controller$path);
  172.     }
  173.     private function paginatedListing(City $city, ?string $apiEndpoint, array $apiParams, ?Filter $listingSpec null, ?OrX $alternativeSpec null, ?string $alternativeSource null, ?Response $response null): Page
  174.     {
  175.         $topPlacement $this->profileTopBoard->topPlacementSatisfiedBy($city$listingSpec);
  176.         $topPlacement?->setTopCard(); // mark as top card for UI
  177.         $page $this->getCurrentPageNumber();
  178.         $apiParams['city'] = $city->getId();
  179.         try {
  180.             if (null === $apiEndpoint) {
  181.                 throw new \RuntimeException('Empty API endpoint to switch to legacy listing query.');
  182.             }
  183.             $result $this->listingRotationApi->paginate($apiEndpoint$apiParams$page$topPlacement);
  184.             $response?->setMaxAge(10);
  185.         } catch (\Exception) {
  186.             $avoidOrTopPlacement = (null !== $topPlacement && $page 2) ? $topPlacement null;
  187.             $result $this->profileList->list($citynull$listingSpec, [], truenullProfileList::ORDER_BY_STATUS,
  188.                 nulltruenull, [Genders::FEMALE], $avoidOrTopPlacement);
  189.         }
  190.         return $result;
  191.     }
  192.     #[ParamConverter("city"converter"city_converter")]
  193.     public function listByCity(ParameterBagInterface $parameterBagRequest $requestCity $citybool $subRequest false): Response
  194.     {
  195.         $page $this->getCurrentPageNumber();
  196.         if ($this->features->redirect_default_city_to_homepage() && false === $subRequest && $city->equals($parameterBag->get('default_city')) && $page 2) {
  197.             return $this->redirectToRoute('homepage', [], 301);
  198.         }
  199.         $specs $this->profileListSpecificationService->listByCity();
  200.         $response = new Response();
  201.         $result $this->paginatedListing($city'/city/{city}', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  202.         $homepageCityListingsBlock null;
  203.         if ($this->shouldShowHomepageCityListingsBlock($city$page$subRequest)) {
  204.             $homepageCityListingsBlock $this->homepageCityListingsBlockProvider->getForCity($city);
  205.         }
  206.         return $this->render('ProfileList/list.html.twig', [
  207.             'profiles' => $result,
  208.             'homepage_city_listings_block' => $homepageCityListingsBlock,
  209.             'recommendationSpec' => $specs->recommendationSpec(),
  210.         ], response$response);
  211.     }
  212.     /**
  213.      * @Feature("intim_moscow_listing")
  214.      */
  215.     #[Cache(maxage3600, public: true)]
  216.     public function listIntim(DefaultCityProvider $defaultCityProvider): Response
  217.     {
  218.         $city $defaultCityProvider->getDefaultCity();
  219.         $request $this->requestStack->getCurrentRequest();
  220.         $request?->attributes->set('city'$city);
  221.         $specs $this->profileListSpecificationService->listByCity();
  222.         $response = new Response();
  223.         $result $this->paginatedListing($city'/city/{city}/intim', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  224.         $result $this->shuffleProfilesOnPage($result);
  225.         $response->setMaxAge(3600);
  226.         return $this->render('ProfileList/list.html.twig', [
  227.             'profiles' => $result,
  228.             'city' => $city,
  229.             'recommendationSpec' => $specs->recommendationSpec(),
  230.         ], response$response);
  231.     }
  232.     #[ParamConverter("city"converter"city_converter")]
  233.     #[Entity("county"expr"repository.ofUriIdentityWithinCity(county, city)")]
  234.     public function listByCounty(Request $requestCity $cityCounty $county): Response
  235.     {
  236.         if (!$city->hasCounty($county)) {
  237.             throw $this->createNotFoundException();
  238.         }
  239.         $specs $this->profileListSpecificationService->listByCounty($county);
  240.         $response = new Response();
  241.         $alternativeSpec Spec::orX(ProfileIsLocated::withinCounties($city$city->getCounties()->toArray()));
  242.         $result $this->paginatedListing($city'/city/{city}/county/{county}', ['city' => $city->getId(), 'county' => $county->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_COUNTY$response);
  243.         return $this->render('ProfileList/list.html.twig', [
  244.             'profiles' => $result,
  245.             'source' => $this->source,
  246.             'source_default' => self::RESULT_SOURCE_COUNTY,
  247.             'county' => $county,
  248.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  249.                 'city' => $city->getUriIdentity(),
  250.                 'county' => $county->getUriIdentity(),
  251.                 'page' => $this->getCurrentPageNumber()
  252.             ]),
  253.             'recommendationSpec' => $specs->recommendationSpec(),
  254.         ], response$response);
  255.     }
  256.     #[ParamConverter("city"converter"city_converter")]
  257.     #[Entity("district"expr"repository.ofUriIdentityWithinCity(district, city)")]
  258.     public function listByDistrict(Request $requestCity $cityDistrict $district): Response
  259.     {
  260.         if (!$city->hasDistrict($district)) {
  261.             throw $this->createNotFoundException();
  262.         }
  263.         $specs $this->profileListSpecificationService->listByDistrict($district);
  264.         $response = new Response();
  265.         $alternativeSpec Spec::orX(ProfileIsLocated::withinDistricts($city$city->getDistricts()->toArray()));
  266.         $result $this->paginatedListing($city'/city/{city}/district/{district}', ['city' => $city->getId(), 'district' => $district->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_DISTRICT$response);
  267.         return $this->render('ProfileList/list.html.twig', [
  268.             'profiles' => $result,
  269.             'source' => $this->source,
  270.             'source_default' => self::RESULT_SOURCE_DISTRICT,
  271.             'district' => $district,
  272.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  273.                 'city' => $city->getUriIdentity(),
  274.                 'district' => $district->getUriIdentity(),
  275.                 'page' => $this->getCurrentPageNumber()
  276.             ]),
  277.             'recommendationSpec' => $specs->recommendationSpec(),
  278.         ], response$response);
  279.     }
  280.     /**
  281.      * @Feature("extra_category_without_prepayment")
  282.      */
  283.     #[ParamConverter("city"converter"city_converter")]
  284.     public function listWithoutPrepayment(Request $requestCity $city): Response
  285.     {
  286.         $listingData $this->profileListingDataCreator->getListingDataForFilter('listWithoutPrepayment', [], $city);
  287.         $specs $listingData['specs'];
  288.         $listingTypeName $listingData['listingTypeName'];
  289.         $response = new Response();
  290.         $result $this->paginatedListing($city'/city/{city}/category/without_prepayment', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  291.         $request->attributes->set('profiles_count'$result->totalCount());
  292.         $request->attributes->set('listingTypeName'$listingTypeName);
  293.         $request->attributes->set('city'$city);
  294.         return $this->render('ProfileList/list.html.twig', [
  295.             'profiles' => $result,
  296.             'source' => $this->source,
  297.             'source_default' => 'without_prepayment',
  298.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  299.                 'city' => $city->getUriIdentity(),
  300.                 'page' => $this->getCurrentPageNumber(),
  301.             ]),
  302.             'recommendationSpec' => $specs->recommendationSpec(),
  303.         ], response$response);
  304.     }
  305.     #[ParamConverter("city"converter"city_converter")]
  306.     #[Entity("station"expr"repository.ofUriIdentityWithinCity(station, city)")]
  307.     public function listByStation(Request $requestCity $cityStation $station): Response
  308.     {
  309.         if (!$city->hasStation($station)) {
  310.             throw $this->createNotFoundException();
  311.         }
  312.         $specs $this->profileListSpecificationService->listByStation($station);
  313.         $response = new Response();
  314.         $result $this->paginatedListing($city'/city/{city}/station/{station}', ['city' => $city->getId(), 'station' => $station->getId()], $specs->spec(), nullnull$response);
  315.         return $this->render('ProfileList/list.html.twig', [
  316.             'profiles' => $result,
  317.             'source' => $this->source,
  318.             'source_default' => self::RESULT_SOURCE_STATION,
  319.             'station' => $station,
  320.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  321.                 'city' => $city->getUriIdentity(),
  322.                 'station' => $station->getUriIdentity(),
  323.                 'page' => $this->getCurrentPageNumber()
  324.             ]),
  325.             'recommendationSpec' => $specs->recommendationSpec(),
  326.         ], response$response);
  327.     }
  328.     #[ParamConverter("city"converter"city_converter")]
  329.     public function listByStations(City $citystring $stationsStationRepository $stationRepository): Response
  330.     {
  331.         $stationIds explode(','$stations);
  332.         $stations $stationRepository->findBy(['uriIdentity' => $stationIds]);
  333.         $specs $this->profileListSpecificationService->listByStations($stations);
  334.         $response = new Response();
  335.         $result $this->paginatedListing($citynull, [], $specs->spec(), nullnull$response);
  336.         return $this->render('ProfileList/list.html.twig', [
  337.             'profiles' => $result,
  338.             'recommendationSpec' => $specs->recommendationSpec(),
  339.         ]);
  340.     }
  341.     #[ParamConverter("city"converter"city_converter")]
  342.     public function listApproved(Request $requestCity $city): Response
  343.     {
  344.         $specs $this->profileListSpecificationService->listApproved();
  345.         $response = new Response();
  346.         $result $this->paginatedListing($city'/city/{city}/approved', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  347.         return $this->render('ProfileList/list.html.twig', [
  348.             'profiles' => $result,
  349.             'source' => $this->source,
  350.             'source_default' => self::RESULT_SOURCE_APPROVED,
  351.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  352.                 'city' => $city->getUriIdentity(),
  353.                 'page' => $this->getCurrentPageNumber()
  354.             ]),
  355.             'recommendationSpec' => $specs->recommendationSpec(),
  356.         ], response$response);
  357.     }
  358.     /**
  359.      * @Feature("extra_category_with_whatsapp")
  360.      */
  361.     #[ParamConverter("city"converter"city_converter")]
  362.     public function listWithWhatsapp(Request $requestCity $city): Response
  363.     {
  364.         $specs $this->profileListSpecificationService->listWithWhatsapp();
  365.         $response = new Response();
  366.         $result $this->paginatedListing($city'/city/{city}/category/whatsapp', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  367.         return $this->render('ProfileList/list.html.twig', [
  368.             'profiles' => $result,
  369.             'source' => $this->source,
  370.             'source_default' => self::RESULT_SOURCE_WITH_WHATSAPP,
  371.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  372.                 'city' => $city->getUriIdentity(),
  373.                 'page' => $this->getCurrentPageNumber(),
  374.             ]),
  375.             'recommendationSpec' => $specs->recommendationSpec(),
  376.         ], response$response);
  377.     }
  378.     /**
  379.      * @Feature("extra_category_with_telegram")
  380.      */
  381.     #[ParamConverter("city"converter"city_converter")]
  382.     public function listWithTelegram(Request $requestCity $city): Response
  383.     {
  384.         $specs $this->profileListSpecificationService->listWithTelegram();
  385.         $response = new Response();
  386.         $result $this->paginatedListing($city'/city/{city}/category/telegram', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  387.         return $this->render('ProfileList/list.html.twig', [
  388.             'profiles' => $result,
  389.             'source' => $this->source,
  390.             'source_default' => self::RESULT_SOURCE_WITH_TELEGRAM,
  391.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  392.                 'city' => $city->getUriIdentity(),
  393.                 'page' => $this->getCurrentPageNumber(),
  394.             ]),
  395.             'recommendationSpec' => $specs->recommendationSpec(),
  396.         ], response$response);
  397.     }
  398.     /**
  399.      * @Feature("extra_category_eighteen_years_old")
  400.      */
  401.     #[ParamConverter("city"converter"city_converter")]
  402.     public function listEighteenYearsOld(Request $requestCity $city): Response
  403.     {
  404.         $specs $this->profileListSpecificationService->listEighteenYearsOld();
  405.         $response = new Response();
  406.         $result $this->paginatedListing($city'/city/{city}/category/eighteen_years_old', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  407.         return $this->render('ProfileList/list.html.twig', [
  408.             'profiles' => $result,
  409.             'source' => $this->source,
  410.             'source_default' => self::RESULT_SOURCE_EIGHTEEN_YEARS_OLD,
  411.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  412.                 'city' => $city->getUriIdentity(),
  413.                 'page' => $this->getCurrentPageNumber(),
  414.             ]),
  415.             'recommendationSpec' => $specs->recommendationSpec(),
  416.         ], response$response);
  417.     }
  418.     /**
  419.      * @Feature("extra_category_rublevskie")
  420.      */
  421.     #[ParamConverter("city"converter"city_converter")]
  422.     public function listRublevskie(Request $requestCity $city): Response
  423.     {
  424.         if ($city->getUriIdentity() !== 'moscow') {
  425.             throw $this->createNotFoundException();
  426.         }
  427.         $specs $this->profileListSpecificationService->listRublevskie($city);
  428.         $response = new Response();
  429.         $result $this->paginatedListing($city'/city/{city}/category/rublevskie', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  430.         return $this->render('ProfileList/list.html.twig', [
  431.             'profiles' => $result,
  432.             'source' => $this->source,
  433.             'source_default' => 'rublevskie',
  434.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  435.                 'city' => $city->getUriIdentity(),
  436.                 'page' => $this->getCurrentPageNumber(),
  437.             ]),
  438.             'recommendationSpec' => $specs->recommendationSpec(),
  439.         ], response$response);
  440.     }
  441.     /**
  442.      * @Feature("extra_category_with_tattoo")
  443.      */
  444.     #[ParamConverter("city"converter"city_converter")]
  445.     public function listWithTattoo(Request $requestCity $city): Response
  446.     {
  447.         $specs $this->profileListSpecificationService->listWithTattoo();
  448.         $response = new Response();
  449.         $result $this->paginatedListing($city'/city/{city}/category/with_tattoo', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  450.         return $this->render('ProfileList/list.html.twig', [
  451.             'profiles' => $result,
  452.             'source' => $this->source,
  453.             'source_default' => self::RESULT_SOURCE_WITH_TATTOO,
  454.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  455.                 'city' => $city->getUriIdentity(),
  456.                 'page' => $this->getCurrentPageNumber(),
  457.             ]),
  458.             'recommendationSpec' => $specs->recommendationSpec(),
  459.         ], response$response);
  460.     }
  461.     #[ParamConverter("city"converter"city_converter")]
  462.     public function listWithComments(Request $requestCity $city): Response
  463.     {
  464.         $specs $this->profileListSpecificationService->listWithComments();
  465.         $response = new Response();
  466.         $result $this->paginatedListing($city'/city/{city}/with_comments', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  467.         return $this->render('ProfileList/list.html.twig', [
  468.             'profiles' => $result,
  469.             'source' => $this->source,
  470.             'source_default' => self::RESULT_SOURCE_WITH_COMMENTS,
  471.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  472.                 'city' => $city->getUriIdentity(),
  473.                 'page' => $this->getCurrentPageNumber()
  474.             ]),
  475.             'recommendationSpec' => $specs->recommendationSpec(),
  476.         ], response$response);
  477.     }
  478.     /**
  479.      * @Feature("extra_category_with_piercing")
  480.      */
  481.     #[ParamConverter("city"converter"city_converter")]
  482.     public function listWithPiercing(Request $requestCity $city): Response
  483.     {
  484.         $specs $this->profileListSpecificationService->listWithPiercing();
  485.         $response = new Response();
  486.         $result $this->paginatedListing($city'/city/{city}/category/with_piercing', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  487.         return $this->render('ProfileList/list.html.twig', [
  488.             'profiles' => $result,
  489.             'source' => $this->source,
  490.             'source_default' => self::RESULT_SOURCE_WITH_PIERCING,
  491.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  492.                 'city' => $city->getUriIdentity(),
  493.                 'page' => $this->getCurrentPageNumber(),
  494.             ]),
  495.             'recommendationSpec' => $specs->recommendationSpec(),
  496.         ], response$response);
  497.     }
  498.     #[ParamConverter("city"converter"city_converter")]
  499.     public function listWithVideo(Request $requestCity $city): Response
  500.     {
  501.         $specs $this->profileListSpecificationService->listWithVideo();
  502.         $response = new Response();
  503.         $result $this->paginatedListing($city'/city/{city}/with_video', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  504.         return $this->render('ProfileList/list.html.twig', [
  505.             'profiles' => $result,
  506.             'source' => $this->source,
  507.             'source_default' => self::RESULT_SOURCE_WITH_VIDEO,
  508.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  509.                 'city' => $city->getUriIdentity(),
  510.                 'page' => $this->getCurrentPageNumber()
  511.             ]),
  512.             'recommendationSpec' => $specs->recommendationSpec(),
  513.         ], response$response);
  514.     }
  515.      /**
  516.      * @Feature("extra_category_round_the_clock")
  517.      */
  518.     #[ParamConverter("city"converter"city_converter")]
  519.     public function listRoundTheClock(Request $requestCity $city): Response
  520.     {
  521.         $specs $this->profileListSpecificationService->listRoundTheClock();
  522.         $response = new Response();
  523.         $result $this->paginatedListing($city'/city/{city}/category/round_the_clock', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  524.         return $this->render('ProfileList/list.html.twig', [
  525.             'profiles' => $result,
  526.             'source' => $this->source,
  527.             'source_default' => self::RESULT_SOURCE_ROUND_THE_CLOCK,
  528.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  529.                 'city' => $city->getUriIdentity(),
  530.                 'page' => $this->getCurrentPageNumber(),
  531.             ]),
  532.             'recommendationSpec' => $specs->recommendationSpec(),
  533.         ], response$response);
  534.     }
  535.     /**
  536.      * @Feature("extra_category_for_two_hours")
  537.      */
  538.     #[ParamConverter("city"converter"city_converter")]
  539.     public function listForTwoHours(Request $requestCity $city): Response
  540.     {
  541.         $specs $this->profileListSpecificationService->listForTwoHours();
  542.         $response = new Response();
  543.         $result $this->paginatedListing($city'/city/{city}/category/for_two_hours', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  544.         return $this->render('ProfileList/list.html.twig', [
  545.             'profiles' => $result,
  546.             'source' => $this->source,
  547.             'source_default' => self::RESULT_SOURCE_FOR_TWO_HOURS,
  548.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  549.                 'city' => $city->getUriIdentity(),
  550.                 'page' => $this->getCurrentPageNumber(),
  551.             ]),
  552.             'recommendationSpec' => $specs->recommendationSpec(),
  553.         ], response$response);
  554.     }
  555.     /**
  556.      * @Feature("extra_category_for_hour")
  557.      */
  558.     #[ParamConverter("city"converter"city_converter")]
  559.     public function listForHour(Request $requestCity $city): Response
  560.     {
  561.         $specs $this->profileListSpecificationService->listForHour();
  562.         $response = new Response();
  563.         $result $this->paginatedListing($city'/city/{city}/category/for_hour', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  564.         return $this->render('ProfileList/list.html.twig', [
  565.             'profiles' => $result,
  566.             'source' => $this->source,
  567.             'source_default' => self::RESULT_SOURCE_FOR_HOUR,
  568.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  569.                 'city' => $city->getUriIdentity(),
  570.                 'page' => $this->getCurrentPageNumber(),
  571.             ]),
  572.             'recommendationSpec' => $specs->recommendationSpec(),
  573.         ], response$response);
  574.     }
  575.     /**
  576.      * @Feature("extra_category_express_program")
  577.      */
  578.     #[ParamConverter("city"converter"city_converter")]
  579.     public function listExpress(Request $requestCity $city): Response
  580.     {
  581.         $specs $this->profileListSpecificationService->listExpress();
  582.         $response = new Response();
  583.         $result $this->paginatedListing($city'/city/{city}/category/express', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  584.         return $this->render('ProfileList/list.html.twig', [
  585.             'profiles' => $result,
  586.             'source' => $this->source,
  587.             'source_default' => self::RESULT_SOURCE_EXPRESS_PROGRAM,
  588.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  589.                 'city' => $city->getUriIdentity(),
  590.                 'page' => $this->getCurrentPageNumber(),
  591.             ]),
  592.             'recommendationSpec' => $specs->recommendationSpec(),
  593.         ], response$response);
  594.     }
  595.     /**
  596.      * @Feature("extra_category_grandmothers")
  597.      */
  598.     #[ParamConverter("city"converter"city_converter")]
  599.     public function listGrandmothers(Request $requestCity $city): Response
  600.     {
  601.         $specs $this->profileListSpecificationService->listGrandmothers();
  602.         $response = new Response();
  603.         $result $this->paginatedListing($city'/city/{city}/category/grandmothers', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  604.         return $this->render('ProfileList/list.html.twig', [
  605.             'profiles' => $result,
  606.             'source' => $this->source,
  607.             'source_default' => 'grandmothers',
  608.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  609.                 'city' => $city->getUriIdentity(),
  610.                 'page' => $this->getCurrentPageNumber(),
  611.             ]),
  612.             'recommendationSpec' => $specs->recommendationSpec(),
  613.         ], response$response);
  614.     }
  615.         /**
  616.      * @Feature("extra_category_big_breast")
  617.      */
  618.     #[ParamConverter("city"converter"city_converter")]
  619.     public function listBigBreast(Request $requestCity $city): Response
  620.     {
  621.         $specs $this->profileListSpecificationService->listBigBreast();
  622.         $response = new Response();
  623.         $result $this->paginatedListing($city'/city/{city}/category/big_breast', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  624.         return $this->render('ProfileList/list.html.twig', [
  625.             'profiles' => $result,
  626.             'source' => $this->source,
  627.             'source_default' => 'big_breast',
  628.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  629.                 'city' => $city->getUriIdentity(),
  630.                 'page' => $this->getCurrentPageNumber(),
  631.             ]),
  632.             'recommendationSpec' => $specs->recommendationSpec(),
  633.         ], response$response);
  634.     }
  635.     /**
  636.      * @Feature("extra_category_very_skinny")
  637.      */
  638.     #[ParamConverter("city"converter"city_converter")]
  639.     public function listVerySkinny(Request $requestCity $city): Response
  640.     {
  641.         $specs $this->profileListSpecificationService->listVerySkinny();
  642.         $response = new Response();
  643.         $result $this->paginatedListing($city'/city/{city}/category/very_skinny', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  644.         return $this->render('ProfileList/list.html.twig', [
  645.             'profiles' => $result,
  646.             'source' => $this->source,
  647.             'source_default' => 'very_skinny',
  648.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  649.                 'city' => $city->getUriIdentity(),
  650.                 'page' => $this->getCurrentPageNumber(),
  651.             ]),
  652.             'recommendationSpec' => $specs->recommendationSpec(),
  653.         ], response$response);
  654.     }
  655.     /**
  656.      * @Feature("extra_category_small_ass")
  657.      */
  658.     #[ParamConverter("city"converter"city_converter")]
  659.     public function listSmallAss(Request $requestCity $city): Response
  660.     {
  661.         $specs $this->profileListSpecificationService->listSmallAss();
  662.         $response = new Response();
  663.         $result $this->paginatedListing($city'/city/{city}/category/small_ass', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  664.         return $this->render('ProfileList/list.html.twig', [
  665.             'profiles' => $result,
  666.             'source' => $this->source,
  667.             'source_default' => 'small_ass',
  668.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  669.                 'city' => $city->getUriIdentity(),
  670.                 'page' => $this->getCurrentPageNumber(),
  671.             ]),
  672.             'recommendationSpec' => $specs->recommendationSpec(),
  673.         ], response$response);
  674.     }
  675.     /**
  676.      * @Feature("extra_category_beautiful_prostitutes")
  677.      */
  678.     #[ParamConverter("city"converter"city_converter")]
  679.     public function listBeautifulProstitutes(Request $requestCity $city): Response
  680.     {
  681.         $specs $this->profileListSpecificationService->listBeautifulProstitutes();
  682.         $response = new Response();
  683.         $result $this->paginatedListing($city'/city/{city}/category/beautiful_prostitutes', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  684.         return $this->render('ProfileList/list.html.twig', [
  685.             'profiles' => $result,
  686.             'source' => $this->source,
  687.             'source_default' => 'beautiful_prostitutes',
  688.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  689.                 'city' => $city->getUriIdentity(),
  690.                 'page' => $this->getCurrentPageNumber(),
  691.             ]),
  692.             'recommendationSpec' => $specs->recommendationSpec(),
  693.         ], response$response);
  694.     }
  695.     /**
  696.      * @Feature("extra_category_without_intermediaries")
  697.      */
  698.     #[ParamConverter("city"converter"city_converter")]
  699.     public function listWithoutIntermediaries(Request $requestCity $city): Response
  700.     {
  701.         $specs $this->profileListSpecificationService->listWithoutIntermediaries();
  702.         $response = new Response();
  703.         $result $this->paginatedListing($city'/city/{city}/category/without_intermediaries', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  704.         return $this->render('ProfileList/list.html.twig', [
  705.             'profiles' => $result,
  706.             'source' => $this->source,
  707.             'source_default' => 'without_intermediaries',
  708.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  709.                 'city' => $city->getUriIdentity(),
  710.                 'page' => $this->getCurrentPageNumber(),
  711.             ]),
  712.             'recommendationSpec' => $specs->recommendationSpec(),
  713.         ], response$response);
  714.     }
  715.     /**
  716.      * @Feature("extra_category_intim_services")
  717.      */
  718.     #[ParamConverter("city"converter"city_converter")]
  719.     public function intimServices(Request $requestCity $city): Response
  720.     {
  721.         $servicesByGroup $this->serviceRepository->allIndexedByGroup();
  722.         return $this->render('ProfileList/intim_services.html.twig', [
  723.             'city' => $city,
  724.             'servicesByGroup' => $servicesByGroup,
  725.             'skipSetCurrentListingPage' => true,
  726.         ]);
  727.     }
  728.     /**
  729.      * @Feature("extra_category_outcall")
  730.      */
  731.     #[ParamConverter("city"converter"city_converter")]
  732.     public function listOutcall(Request $requestCity $city): Response
  733.     {
  734.         $specs $this->profileListSpecificationService->listByOutcall();
  735.         $response = new Response();
  736.         $result $this->paginatedListing($city'/city/{city}/category/outcall', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  737.         return $this->render('ProfileList/list.html.twig', [
  738.             'profiles' => $result,
  739.             'source' => $this->source,
  740.             'source_default' => 'outcall',
  741.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  742.                 'city' => $city->getUriIdentity(),
  743.                 'page' => $this->getCurrentPageNumber(),
  744.             ]),
  745.             'recommendationSpec' => $specs->recommendationSpec(),
  746.         ], response$response);
  747.     }
  748.     /**
  749.      * @Feature("extra_category_dwarfs")
  750.      */
  751.     #[ParamConverter("city"converter"city_converter")]
  752.     public function listDwarfs(Request $requestCity $city): Response
  753.     {
  754.         $specs $this->profileListSpecificationService->listDwarfs();
  755.         $response = new Response();
  756.         $result $this->paginatedListing($city'/city/{city}/category/dwarfs', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  757.         return $this->render('ProfileList/list.html.twig', [
  758.             'profiles' => $result,
  759.             'source' => $this->source,
  760.             'source_default' => 'dwarfs',
  761.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  762.                 'city' => $city->getUriIdentity(),
  763.                 'page' => $this->getCurrentPageNumber(),
  764.             ]),
  765.             'recommendationSpec' => $specs->recommendationSpec(),
  766.         ], response$response);
  767.     }
  768.     #[ParamConverter("city"converter"city_converter")]
  769.     public function listWithSelfie(Request $requestCity $city): Response
  770.     {
  771.         $specs $this->profileListSpecificationService->listWithSelfie();
  772.         $response = new Response();
  773.         $result $this->paginatedListing($city'/city/{city}/with_selfie', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  774.         return $this->render('ProfileList/list.html.twig', [
  775.             'profiles' => $result,
  776.             'source' => $this->source,
  777.             'source_default' => self::RESULT_SOURCE_WITH_SELFIE,
  778.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  779.                 'city' => $city->getUriIdentity(),
  780.                 'page' => $this->getCurrentPageNumber()
  781.             ]),
  782.             'recommendationSpec' => $specs->recommendationSpec(),
  783.         ], response$response);
  784.     }
  785.     #[ParamConverter("city"converter"city_converter")]
  786.     #[Feature("extra_category_top_100")]
  787.     public function listTop100(Request $requestCity $city): Response
  788.     {
  789.         $specs $this->profileListSpecificationService->listApproved();
  790.         $result $this->top100ProfilesService->getSortedProfilesByVisits($city);
  791.         return $this->render('ProfileList/list.html.twig', [
  792.             'profiles' => $result,
  793.             'source' => self::RESULT_SOURCE_TOP_100,
  794.             'source_default' => self::RESULT_SOURCE_TOP_100,
  795.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  796.                 'city' => $city->getUriIdentity(),
  797.                 'page' => $this->getCurrentPageNumber(),
  798.             ]),
  799.             'recommendationSpec' => $specs->recommendationSpec(),
  800.         ]);
  801.     }
  802.     /**
  803.      * @Feature("extra_category_eromassage")
  804.      */
  805.     #[ParamConverter("city"converter"city_converter")]
  806.     #[Entity("county"expr"repository.ofUriIdentityWithinCity(county, city)")]
  807.     public function listByCountyEromassage(Request $requestCity $cityCounty $county): Response
  808.     {
  809.         if (!$city->hasCounty($county)) {
  810.             throw $this->createNotFoundException();
  811.         }
  812.         $specs $this->profileListSpecificationService->listByCountyEromassage($county);
  813.         $response = new Response();
  814.         $result $this->paginatedListing(
  815.             $city,
  816.             '/city/{city}/county/{county}/eromassage',
  817.             ['city' => $city->getId(), 'county' => $county->getId()],
  818.             $specs->spec(),
  819.             null,
  820.             null,
  821.             $response
  822.         );
  823.         $request->attributes->set('profiles_count'$result->totalCount());
  824.         return $this->render('ProfileList/list.html.twig', [
  825.             'profiles' => $result,
  826.             'source' => $this->source,
  827.             'source_default' => self::RESULT_SOURCE_EROMASSAGE,
  828.             'county' => $county,
  829.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  830.                 'city' => $city->getUriIdentity(),
  831.                 'county' => $county->getUriIdentity(),
  832.                 'page' => $this->getCurrentPageNumber(),
  833.             ]),
  834.             'recommendationSpec' => $specs->recommendationSpec(),
  835.         ], response$response);
  836.     }
  837.     /**
  838.      * @Feature("extra_category_eromassage")
  839.      */
  840.     #[ParamConverter("city"converter"city_converter")]
  841.     #[Entity("district"expr"repository.ofUriIdentityWithinCity(district, city)")]
  842.     public function listByDistrictEromassage(Request $requestCity $cityDistrict $district): Response
  843.     {
  844.         if (!$city->hasDistrict($district)) {
  845.             throw $this->createNotFoundException();
  846.         }
  847.         $specs $this->profileListSpecificationService->listByDistrictEromassage($district);
  848.         $response = new Response();
  849.         $result $this->paginatedListing(
  850.             $city,
  851.             '/city/{city}/district/{district}/eromassage',
  852.             ['city' => $city->getId(), 'district' => $district->getId()],
  853.             $specs->spec(),
  854.             null,
  855.             null,
  856.             $response
  857.         );
  858.         $request->attributes->set('profiles_count'$result->totalCount());
  859.         return $this->render('ProfileList/list.html.twig', [
  860.             'profiles' => $result,
  861.             'source' => $this->source,
  862.             'source_default' => self::RESULT_SOURCE_EROMASSAGE,
  863.             'district' => $district,
  864.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  865.                 'city' => $city->getUriIdentity(),
  866.                 'district' => $district->getUriIdentity(),
  867.                 'page' => $this->getCurrentPageNumber(),
  868.             ]),
  869.             'recommendationSpec' => $specs->recommendationSpec(),
  870.         ], response$response);
  871.     }
  872.     /**
  873.      * @Feature("extra_category_eromassage")
  874.      */
  875.     #[ParamConverter("city"converter"city_converter")]
  876.     #[Entity("station"expr"repository.ofUriIdentityWithinCity(station, city)")]
  877.     public function listByStationEromassage(Request $requestCity $cityStation $station): Response
  878.     {
  879.         if (!$city->hasStation($station)) {
  880.             throw $this->createNotFoundException();
  881.         }
  882.         $specs $this->profileListSpecificationService->listByStationEromassage($station);
  883.         $response = new Response();
  884.         $result $this->paginatedListing(
  885.             $city,
  886.             '/city/{city}/station/{station}/eromassage',
  887.             ['city' => $city->getId(), 'station' => $station->getId()],
  888.             $specs->spec(),
  889.             null,
  890.             null,
  891.             $response
  892.         );
  893.         $request->attributes->set('profiles_count'$result->totalCount());
  894.         return $this->render('ProfileList/list.html.twig', [
  895.             'profiles' => $result,
  896.             'source' => $this->source,
  897.             'source_default' => self::RESULT_SOURCE_EROMASSAGE,
  898.             'station' => $station,
  899.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  900.                 'city' => $city->getUriIdentity(),
  901.                 'station' => $station->getUriIdentity(),
  902.                 'page' => $this->getCurrentPageNumber(),
  903.             ]),
  904.             'recommendationSpec' => $specs->recommendationSpec(),
  905.         ], response$response);
  906.     }
  907.     /**
  908.      * @Feature("extra_category_verified")
  909.      */
  910.     #[ParamConverter("city"converter"city_converter")]
  911.     #[Entity("county"expr"repository.ofUriIdentityWithinCity(county, city)")]
  912.     public function listByCountyVerified(Request $requestCity $cityCounty $county): Response
  913.     {
  914.         if (!$city->hasCounty($county)) {
  915.             throw $this->createNotFoundException();
  916.         }
  917.         $specs $this->profileListSpecificationService->listByCountyVerified($county);
  918.         $response = new Response();
  919.         $result $this->paginatedListing(
  920.             $city,
  921.             '/city/{city}/county/{county}/proverennye',
  922.             ['city' => $city->getId(), 'county' => $county->getId()],
  923.             $specs->spec(),
  924.             null,
  925.             null,
  926.             $response
  927.         );
  928.         $request->attributes->set('profiles_count'$result->totalCount());
  929.         return $this->render('ProfileList/list.html.twig', [
  930.             'profiles' => $result,
  931.             'source' => $this->source,
  932.             'source_default' => self::RESULT_SOURCE_VERIFIED,
  933.             'county' => $county,
  934.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  935.                 'city' => $city->getUriIdentity(),
  936.                 'county' => $county->getUriIdentity(),
  937.                 'page' => $this->getCurrentPageNumber(),
  938.             ]),
  939.             'recommendationSpec' => $specs->recommendationSpec(),
  940.         ], response$response);
  941.     }
  942.     /**
  943.      * @Feature("extra_category_verified")
  944.      */
  945.     #[ParamConverter("city"converter"city_converter")]
  946.     #[Entity("district"expr"repository.ofUriIdentityWithinCity(district, city)")]
  947.     public function listByDistrictVerified(Request $requestCity $cityDistrict $district): Response
  948.     {
  949.         if (!$city->hasDistrict($district)) {
  950.             throw $this->createNotFoundException();
  951.         }
  952.         $specs $this->profileListSpecificationService->listByDistrictVerified($district);
  953.         $response = new Response();
  954.         $result $this->paginatedListing(
  955.             $city,
  956.             '/city/{city}/district/{district}/proverennye',
  957.             ['city' => $city->getId(), 'district' => $district->getId()],
  958.             $specs->spec(),
  959.             null,
  960.             null,
  961.             $response
  962.         );
  963.         $request->attributes->set('profiles_count'$result->totalCount());
  964.         return $this->render('ProfileList/list.html.twig', [
  965.             'profiles' => $result,
  966.             'source' => $this->source,
  967.             'source_default' => self::RESULT_SOURCE_VERIFIED,
  968.             'district' => $district,
  969.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  970.                 'city' => $city->getUriIdentity(),
  971.                 'district' => $district->getUriIdentity(),
  972.                 'page' => $this->getCurrentPageNumber(),
  973.             ]),
  974.             'recommendationSpec' => $specs->recommendationSpec(),
  975.         ], response$response);
  976.     }
  977.     /**
  978.      * @Feature("extra_category_verified")
  979.      */
  980.     #[ParamConverter("city"converter"city_converter")]
  981.     #[Entity("station"expr"repository.ofUriIdentityWithinCity(station, city)")]
  982.     public function listByStationVerified(Request $requestCity $cityStation $station): Response
  983.     {
  984.         if (!$city->hasStation($station)) {
  985.             throw $this->createNotFoundException();
  986.         }
  987.         $specs $this->profileListSpecificationService->listByStationVerified($station);
  988.         $response = new Response();
  989.         $result $this->paginatedListing(
  990.             $city,
  991.             '/city/{city}/station/{station}/proverennye',
  992.             ['city' => $city->getId(), 'station' => $station->getId()],
  993.             $specs->spec(),
  994.             null,
  995.             null,
  996.             $response
  997.         );
  998.         $request->attributes->set('profiles_count'$result->totalCount());
  999.         return $this->render('ProfileList/list.html.twig', [
  1000.             'profiles' => $result,
  1001.             'source' => $this->source,
  1002.             'source_default' => self::RESULT_SOURCE_VERIFIED,
  1003.             'station' => $station,
  1004.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1005.                 'city' => $city->getUriIdentity(),
  1006.                 'station' => $station->getUriIdentity(),
  1007.                 'page' => $this->getCurrentPageNumber(),
  1008.             ]),
  1009.             'recommendationSpec' => $specs->recommendationSpec(),
  1010.         ], response$response);
  1011.     }
  1012.     /**
  1013.      * @Feature("extra_category_cheap")
  1014.      */
  1015.     #[ParamConverter("city"converter"city_converter")]
  1016.     #[Entity("county"expr"repository.ofUriIdentityWithinCity(county, city)")]
  1017.     public function listByCountyCheap(Request $requestCity $cityCounty $county): Response
  1018.     {
  1019.         if (!$city->hasCounty($county)) {
  1020.             throw $this->createNotFoundException();
  1021.         }
  1022.         $specs $this->profileListSpecificationService->listByCountyCheap($county);
  1023.         $response = new Response();
  1024.         $result $this->paginatedListing(
  1025.             $city,
  1026.             null,
  1027.             [],
  1028.             $specs->spec(),
  1029.             null,
  1030.             null,
  1031.             $response
  1032.         );
  1033.         $request->attributes->set('profiles_count'$result->totalCount());
  1034.         return $this->render('ProfileList/list.html.twig', [
  1035.             'profiles' => $result,
  1036.             'source' => $this->source,
  1037.             'source_default' => self::RESULT_SOURCE_CHEAP,
  1038.             'county' => $county,
  1039.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1040.                 'city' => $city->getUriIdentity(),
  1041.                 'county' => $county->getUriIdentity(),
  1042.                 'page' => $this->getCurrentPageNumber(),
  1043.             ]),
  1044.             'recommendationSpec' => $specs->recommendationSpec(),
  1045.         ], response$response);
  1046.     }
  1047.     /**
  1048.      * @Feature("extra_category_cheap")
  1049.      */
  1050.     #[ParamConverter("city"converter"city_converter")]
  1051.     #[Entity("district"expr"repository.ofUriIdentityWithinCity(district, city)")]
  1052.     public function listByDistrictCheap(Request $requestCity $cityDistrict $district): Response
  1053.     {
  1054.         if (!$city->hasDistrict($district)) {
  1055.             throw $this->createNotFoundException();
  1056.         }
  1057.         $specs $this->profileListSpecificationService->listByDistrictCheap($district);
  1058.         $response = new Response();
  1059.         $result $this->paginatedListing(
  1060.             $city,
  1061.             null,
  1062.             [],
  1063.             $specs->spec(),
  1064.             null,
  1065.             null,
  1066.             $response
  1067.         );
  1068.         $request->attributes->set('profiles_count'$result->totalCount());
  1069.         return $this->render('ProfileList/list.html.twig', [
  1070.             'profiles' => $result,
  1071.             'source' => $this->source,
  1072.             'source_default' => self::RESULT_SOURCE_CHEAP,
  1073.             'district' => $district,
  1074.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1075.                 'city' => $city->getUriIdentity(),
  1076.                 'district' => $district->getUriIdentity(),
  1077.                 'page' => $this->getCurrentPageNumber(),
  1078.             ]),
  1079.             'recommendationSpec' => $specs->recommendationSpec(),
  1080.         ], response$response);
  1081.     }
  1082.     /**
  1083.      * @Feature("extra_category_cheap")
  1084.      */
  1085.     #[ParamConverter("city"converter"city_converter")]
  1086.     #[Entity("station"expr"repository.ofUriIdentityWithinCity(station, city)")]
  1087.     public function listByStationCheap(Request $requestCity $cityStation $station): Response
  1088.     {
  1089.         if (!$city->hasStation($station)) {
  1090.             throw $this->createNotFoundException();
  1091.         }
  1092.         $specs $this->profileListSpecificationService->listByStationCheap($station);
  1093.         $response = new Response();
  1094.         $result $this->paginatedListing(
  1095.             $city,
  1096.             null,
  1097.             [],
  1098.             $specs->spec(),
  1099.             null,
  1100.             null,
  1101.             $response
  1102.         );
  1103.         $request->attributes->set('profiles_count'$result->totalCount());
  1104.         return $this->render('ProfileList/list.html.twig', [
  1105.             'profiles' => $result,
  1106.             'source' => $this->source,
  1107.             'source_default' => self::RESULT_SOURCE_CHEAP,
  1108.             'station' => $station,
  1109.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1110.                 'city' => $city->getUriIdentity(),
  1111.                 'station' => $station->getUriIdentity(),
  1112.                 'page' => $this->getCurrentPageNumber(),
  1113.             ]),
  1114.             'recommendationSpec' => $specs->recommendationSpec(),
  1115.         ], response$response);
  1116.     }
  1117.     /**
  1118.      * @Feature("extra_category_mature")
  1119.      */
  1120.     #[ParamConverter("city"converter"city_converter")]
  1121.     #[Entity("county"expr"repository.ofUriIdentityWithinCity(county, city)")]
  1122.     public function listByCountyMature(Request $requestCity $cityCounty $county): Response
  1123.     {
  1124.         if (!$city->hasCounty($county)) {
  1125.             throw $this->createNotFoundException();
  1126.         }
  1127.         $specs $this->profileListSpecificationService->listByCountyMature($county);
  1128.         $response = new Response();
  1129.         $result $this->paginatedListing(
  1130.             $city,
  1131.             null,
  1132.             [],
  1133.             $specs->spec(),
  1134.             null,
  1135.             null,
  1136.             $response
  1137.         );
  1138.         $request->attributes->set('profiles_count'$result->totalCount());
  1139.         return $this->render('ProfileList/list.html.twig', [
  1140.             'profiles' => $result,
  1141.             'source' => $this->source,
  1142.             'source_default' => self::RESULT_SOURCE_MATURE,
  1143.             'county' => $county,
  1144.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1145.                 'city' => $city->getUriIdentity(),
  1146.                 'county' => $county->getUriIdentity(),
  1147.                 'page' => $this->getCurrentPageNumber(),
  1148.             ]),
  1149.             'recommendationSpec' => $specs->recommendationSpec(),
  1150.         ], response$response);
  1151.     }
  1152.     /**
  1153.      * @Feature("extra_category_mature")
  1154.      */
  1155.     #[ParamConverter("city"converter"city_converter")]
  1156.     #[Entity("district"expr"repository.ofUriIdentityWithinCity(district, city)")]
  1157.     public function listByDistrictMature(Request $requestCity $cityDistrict $district): Response
  1158.     {
  1159.         if (!$city->hasDistrict($district)) {
  1160.             throw $this->createNotFoundException();
  1161.         }
  1162.         $specs $this->profileListSpecificationService->listByDistrictMature($district);
  1163.         $response = new Response();
  1164.         $result $this->paginatedListing(
  1165.             $city,
  1166.             null,
  1167.             [],
  1168.             $specs->spec(),
  1169.             null,
  1170.             null,
  1171.             $response
  1172.         );
  1173.         $request->attributes->set('profiles_count'$result->totalCount());
  1174.         return $this->render('ProfileList/list.html.twig', [
  1175.             'profiles' => $result,
  1176.             'source' => $this->source,
  1177.             'source_default' => self::RESULT_SOURCE_MATURE,
  1178.             'district' => $district,
  1179.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1180.                 'city' => $city->getUriIdentity(),
  1181.                 'district' => $district->getUriIdentity(),
  1182.                 'page' => $this->getCurrentPageNumber(),
  1183.             ]),
  1184.             'recommendationSpec' => $specs->recommendationSpec(),
  1185.         ], response$response);
  1186.     }
  1187.     /**
  1188.      * @Feature("extra_category_mature")
  1189.      */
  1190.     #[ParamConverter("city"converter"city_converter")]
  1191.     #[Entity("station"expr"repository.ofUriIdentityWithinCity(station, city)")]
  1192.     public function listByStationMature(Request $requestCity $cityStation $station): Response
  1193.     {
  1194.         if (!$city->hasStation($station)) {
  1195.             throw $this->createNotFoundException();
  1196.         }
  1197.         $specs $this->profileListSpecificationService->listByStationMature($station);
  1198.         $response = new Response();
  1199.         $result $this->paginatedListing(
  1200.             $city,
  1201.             null,
  1202.             [],
  1203.             $specs->spec(),
  1204.             null,
  1205.             null,
  1206.             $response
  1207.         );
  1208.         $request->attributes->set('profiles_count'$result->totalCount());
  1209.         return $this->render('ProfileList/list.html.twig', [
  1210.             'profiles' => $result,
  1211.             'source' => $this->source,
  1212.             'source_default' => self::RESULT_SOURCE_MATURE,
  1213.             'station' => $station,
  1214.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1215.                 'city' => $city->getUriIdentity(),
  1216.                 'station' => $station->getUriIdentity(),
  1217.                 'page' => $this->getCurrentPageNumber(),
  1218.             ]),
  1219.             'recommendationSpec' => $specs->recommendationSpec(),
  1220.         ], response$response);
  1221.     }
  1222.     /**
  1223.      * @Feature("extra_category_uzbek")
  1224.      */
  1225.     #[ParamConverter("city"converter"city_converter")]
  1226.     #[Entity("county"expr"repository.ofUriIdentityWithinCity(county, city)")]
  1227.     public function listByCountyUzbek(Request $requestCity $cityCounty $county): Response
  1228.     {
  1229.         if (!$city->hasCounty($county)) {
  1230.             throw $this->createNotFoundException();
  1231.         }
  1232.         $specs $this->profileListSpecificationService->listByCountyUzbek($county);
  1233.         $response = new Response();
  1234.         $result $this->paginatedListing(
  1235.             $city,
  1236.             '/city/{city}/county/{county}/uzbechki',
  1237.             ['city' => $city->getId(), 'county' => $county->getId()],
  1238.             $specs->spec(),
  1239.             null,
  1240.             null,
  1241.             $response
  1242.         );
  1243.         $request->attributes->set('profiles_count'$result->totalCount());
  1244.         return $this->render('ProfileList/list.html.twig', [
  1245.             'profiles' => $result,
  1246.             'source' => $this->source,
  1247.             'source_default' => self::RESULT_SOURCE_UZBEK,
  1248.             'county' => $county,
  1249.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1250.                 'city' => $city->getUriIdentity(),
  1251.                 'county' => $county->getUriIdentity(),
  1252.                 'page' => $this->getCurrentPageNumber(),
  1253.             ]),
  1254.             'recommendationSpec' => $specs->recommendationSpec(),
  1255.         ], response$response);
  1256.     }
  1257.     /**
  1258.      * @Feature("extra_category_uzbek")
  1259.      */
  1260.     #[ParamConverter("city"converter"city_converter")]
  1261.     #[Entity("district"expr"repository.ofUriIdentityWithinCity(district, city)")]
  1262.     public function listByDistrictUzbek(Request $requestCity $cityDistrict $district): Response
  1263.     {
  1264.         if (!$city->hasDistrict($district)) {
  1265.             throw $this->createNotFoundException();
  1266.         }
  1267.         $specs $this->profileListSpecificationService->listByDistrictUzbek($district);
  1268.         $response = new Response();
  1269.         $result $this->paginatedListing(
  1270.             $city,
  1271.             '/city/{city}/district/{district}/uzbechki',
  1272.             ['city' => $city->getId(), 'district' => $district->getId()],
  1273.             $specs->spec(),
  1274.             null,
  1275.             null,
  1276.             $response
  1277.         );
  1278.         $request->attributes->set('profiles_count'$result->totalCount());
  1279.         return $this->render('ProfileList/list.html.twig', [
  1280.             'profiles' => $result,
  1281.             'source' => $this->source,
  1282.             'source_default' => self::RESULT_SOURCE_UZBEK,
  1283.             'district' => $district,
  1284.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1285.                 'city' => $city->getUriIdentity(),
  1286.                 'district' => $district->getUriIdentity(),
  1287.                 'page' => $this->getCurrentPageNumber(),
  1288.             ]),
  1289.             'recommendationSpec' => $specs->recommendationSpec(),
  1290.         ], response$response);
  1291.     }
  1292.     /**
  1293.      * @Feature("extra_category_uzbek")
  1294.      */
  1295.     #[ParamConverter("city"converter"city_converter")]
  1296.     #[Entity("station"expr"repository.ofUriIdentityWithinCity(station, city)")]
  1297.     public function listByStationUzbek(Request $requestCity $cityStation $station): Response
  1298.     {
  1299.         if (!$city->hasStation($station)) {
  1300.             throw $this->createNotFoundException();
  1301.         }
  1302.         $specs $this->profileListSpecificationService->listByStationUzbek($station);
  1303.         $response = new Response();
  1304.         $result $this->paginatedListing(
  1305.             $city,
  1306.             '/city/{city}/station/{station}/uzbechki',
  1307.             ['city' => $city->getId(), 'station' => $station->getId()],
  1308.             $specs->spec(),
  1309.             null,
  1310.             null,
  1311.             $response
  1312.         );
  1313.         $request->attributes->set('profiles_count'$result->totalCount());
  1314.         return $this->render('ProfileList/list.html.twig', [
  1315.             'profiles' => $result,
  1316.             'source' => $this->source,
  1317.             'source_default' => self::RESULT_SOURCE_UZBEK,
  1318.             'station' => $station,
  1319.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1320.                 'city' => $city->getUriIdentity(),
  1321.                 'station' => $station->getUriIdentity(),
  1322.                 'page' => $this->getCurrentPageNumber(),
  1323.             ]),
  1324.             'recommendationSpec' => $specs->recommendationSpec(),
  1325.         ], response$response);
  1326.     }
  1327.     #[ParamConverter("city"converter"city_converter")]
  1328.     public function listByPrice(Request $requestCountryCurrencyResolver $countryCurrencyResolverCity $citystring $priceTypeint $minPrice nullint $maxPrice null): Response
  1329.     {
  1330.         $specs $this->profileListSpecificationService->listByPrice($city$priceType$minPrice$maxPrice);
  1331.         $response = new Response();
  1332.         $apiEndpoint in_array($priceType, ['low''high''elite']) ? '/city/{city}/price/'.$priceType null;
  1333.         $result $this->paginatedListing($city$apiEndpoint, ['city' => $city->getId()], $specs->spec(), nullnull$response);
  1334.         return $this->render('ProfileList/list.html.twig', [
  1335.             'profiles' => $result,
  1336.             'source' => $this->source,
  1337.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1338.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1339.                 'city' => $city->getUriIdentity(),
  1340.                 'priceType' => $priceType,
  1341.                 'minPrice' => $minPrice,
  1342.                 'maxPrice' => $maxPrice,
  1343.                 'page' => $this->getCurrentPageNumber()
  1344.             ]),
  1345.             'recommendationSpec' => $specs->recommendationSpec(),
  1346.         ], response$response);
  1347.     }
  1348.     #[ParamConverter("city"converter"city_converter")]
  1349.     public function listByAge(Request $requestCity $citystring $ageTypeint $minAge nullint $maxAge null): Response
  1350.     {
  1351.         $specs $this->profileListSpecificationService->listByAge($ageType$minAge$maxAge);
  1352.         $response = new Response();
  1353.         $apiEndpoint in_array($ageType, ['young''old']) ? '/city/{city}/age/'.$ageType null;
  1354.         $result $this->paginatedListing($city$apiEndpoint, ['city' => $city->getId()], $specs->spec(), nullnull$response);
  1355.         return $this->render('ProfileList/list.html.twig', [
  1356.             'profiles' => $result,
  1357.             'source' => $this->source,
  1358.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1359.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1360.                 'city' => $city->getUriIdentity(),
  1361.                 'ageType' => $ageType,
  1362.                 'minAge' => $minAge,
  1363.                 'maxAge' => $maxAge,
  1364.                 'page' => $this->getCurrentPageNumber()
  1365.             ]),
  1366.             'recommendationSpec' => $specs->recommendationSpec(),
  1367.         ], response$response);
  1368.     }
  1369.     #[ParamConverter("city"converter"city_converter")]
  1370.     public function listByHeight(Request $requestCity $citystring $heightType): Response
  1371.     {
  1372.         $specs $this->profileListSpecificationService->listByHeight($heightType);
  1373.         $response = new Response();
  1374.         $result $this->paginatedListing($city'/city/{city}/height/'.$heightType, ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1375.         return $this->render('ProfileList/list.html.twig', [
  1376.             'profiles' => $result,
  1377.             'source' => $this->source,
  1378.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1379.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1380.                 'city' => $city->getUriIdentity(),
  1381.                 'heightType' => $heightType,
  1382.                 'page' => $this->getCurrentPageNumber()
  1383.             ]),
  1384.             'recommendationSpec' => $specs->recommendationSpec(),
  1385.         ], response$response);
  1386.     }
  1387.     #[ParamConverter("city"converter"city_converter")]
  1388.     public function listByBreastType(Request $requestCity $citystring $breastType): Response
  1389.     {
  1390.         if (null === $type BreastTypes::getValueByUriIdentity($breastType)) {
  1391.             throw $this->createNotFoundException();
  1392.         }
  1393.         $specs $this->profileListSpecificationService->listByBreastType($breastType);
  1394.         $response = new Response();
  1395.         $alternativeSpec $this->getORSpecForItemsArray(BreastTypes::getList(), function($item): ProfileWithBreastType {
  1396.             return new ProfileWithBreastType($item);
  1397.         });
  1398.         $result $this->paginatedListing($city'/city/{city}/breasttype/'.$type, ['city' => $city->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_BY_PARAMS$response);
  1399.         return $this->render('ProfileList/list.html.twig', [
  1400.             'profiles' => $result,
  1401.             'source' => $this->source,
  1402.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1403.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1404.                 'city' => $city->getUriIdentity(),
  1405.                 'breastType' => $breastType,
  1406.                 'page' => $this->getCurrentPageNumber()
  1407.             ]),
  1408.             'recommendationSpec' => $specs->recommendationSpec(),
  1409.         ], response$response);
  1410.     }
  1411.     #[ParamConverter("city"converter"city_converter")]
  1412.     public function listByHairColor(Request $requestCity $citystring $hairColor): Response
  1413.     {
  1414.         if (null === $color HairColors::getValueByUriIdentity($hairColor)) {
  1415.             throw $this->createNotFoundException();
  1416.         }
  1417.         $specs $this->profileListSpecificationService->listByHairColor($hairColor);
  1418.         $response = new Response();
  1419.         $alternativeSpec $this->getORSpecForItemsArray(HairColors::getList(), function($item): ProfileWithHairColor {
  1420.             return new ProfileWithHairColor($item);
  1421.         });
  1422.         $result $this->paginatedListing($city'/city/{city}/haircolor/'.$color, ['city' => $city->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_BY_PARAMS$response);
  1423.         return $this->render('ProfileList/list.html.twig', [
  1424.             'profiles' => $result,
  1425.             'source' => $this->source,
  1426.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1427.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1428.                 'city' => $city->getUriIdentity(),
  1429.                 'hairColor' => $hairColor,
  1430.                 'page' => $this->getCurrentPageNumber()
  1431.             ]),
  1432.             'recommendationSpec' => $specs->recommendationSpec(),
  1433.         ], response$response);
  1434.     }
  1435.     #[ParamConverter("city"converter"city_converter")]
  1436.     public function listByBodyType(Request $requestCity $citystring $bodyType): Response
  1437.     {
  1438.         if (null === $type BodyTypes::getValueByUriIdentity($bodyType)) {
  1439.             throw $this->createNotFoundException();
  1440.         }
  1441.         $specs $this->profileListSpecificationService->listByBodyType($bodyType);
  1442.         $response = new Response();
  1443.         $alternativeSpec $this->getORSpecForItemsArray(BodyTypes::getList(), function($item): ProfileWithBodyType {
  1444.             return new ProfileWithBodyType($item);
  1445.         });
  1446.         $result $this->paginatedListing($city'/city/{city}/bodytype/'.$type, ['city' => $city->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_BY_PARAMS$response);
  1447.         return $this->render('ProfileList/list.html.twig', [
  1448.             'profiles' => $result,
  1449.             'source' => $this->source,
  1450.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1451.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1452.                 'city' => $city->getUriIdentity(),
  1453.                 'bodyType' => $bodyType,
  1454.                 'page' => $this->getCurrentPageNumber()
  1455.             ]),
  1456.             'recommendationSpec' => $specs->recommendationSpec(),
  1457.         ], response$response);
  1458.     }
  1459.     #[ParamConverter("city"converter"city_converter")]
  1460.     public function listByPlace(Request $requestCity $citystring $placeTypestring $takeOutLocation null): Response
  1461.     {
  1462.         if ('take-out' === $placeType && null !== $takeOutLocation && null === TakeOutLocations::getValueByUriIdentity($takeOutLocation)) {
  1463.             throw $this->createNotFoundException();
  1464.         }
  1465.         $specs $this->profileListSpecificationService->listByPlace($placeType$takeOutLocation);
  1466.         if (null === $specs) {
  1467.             throw $this->createNotFoundException();
  1468.         }
  1469.         $response = new Response();
  1470.         $alternativeSpec $this->getORSpecForItemsArray(TakeOutLocations::getList(), function($item): ProfileIsProvidingTakeOut {
  1471.             return new ProfileIsProvidingTakeOut($item);
  1472.         });
  1473.         if ($placeType === 'take-out') {
  1474.             $alternativeSpec->orX(new ProfileHasApartments());
  1475.         }
  1476.         $apiEndpoint '/city/{city}/place/'.$placeType;
  1477.         if (null !== $takeOutLocation) {
  1478.             $apiEndpoint .= '/'.$takeOutLocation;
  1479.         }
  1480.         $result $this->paginatedListing($city$apiEndpoint, ['city' => $city->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_BY_PARAMS$response);
  1481.         return $this->render('ProfileList/list.html.twig', [
  1482.             'profiles' => $result,
  1483.             'source' => $this->source,
  1484.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1485.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1486.                 'city' => $city->getUriIdentity(),
  1487.                 'placeType' => $placeType,
  1488.                 'takeOutLocation' => TakeOutLocations::getUriIdentity(TakeOutLocations::getValueByUriIdentity($takeOutLocation)),
  1489.                 'page' => $this->getCurrentPageNumber()
  1490.             ]),
  1491.             'recommendationSpec' => $specs->recommendationSpec(),
  1492.         ], response$response);
  1493.     }
  1494.     #[ParamConverter("city"converter"city_converter")]
  1495.     public function listByPrivateHaircut(Request $requestCity $citystring $privateHaircut): Response
  1496.     {
  1497.         if(null === $type PrivateHaircuts::getValueByUriIdentity($privateHaircut))
  1498.             throw $this->createNotFoundException();
  1499.         $specs $this->profileListSpecificationService->listByPrivateHaircut($privateHaircut);
  1500.         $response = new Response();
  1501.         $apiEndpoint '/city/{city}/privatehaircut/'.$type;
  1502.         $alternativeSpec $this->getORSpecForItemsArray(PrivateHaircuts::getList(), function($item): ProfileWithPrivateHaircut {
  1503.             return new ProfileWithPrivateHaircut($item);
  1504.         });
  1505.         $result $this->paginatedListing($city$apiEndpoint, ['city' => $city->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_BY_PARAMS$response);
  1506.         return $this->render('ProfileList/list.html.twig', [
  1507.             'profiles' => $result,
  1508.             'source' => $this->source,
  1509.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1510.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1511.                 'city' => $city->getUriIdentity(),
  1512.                 'privateHaircut' => $privateHaircut,
  1513.                 'page' => $this->getCurrentPageNumber()
  1514.             ]),
  1515.             'recommendationSpec' => $specs->recommendationSpec(),
  1516.         ], response$response);
  1517.     }
  1518.     #[ParamConverter("city"converter"city_converter")]
  1519.     public function listByNationality(Request $requestCity $citystring $nationality): Response
  1520.     {
  1521.         if (null === $type Nationalities::getValueByUriIdentity($nationality))
  1522.             throw $this->createNotFoundException();
  1523.         $specs $this->profileListSpecificationService->listByNationality($nationality);
  1524.         $response = new Response();
  1525.         $alternativeSpec $this->getORSpecForItemsArray(Nationalities::getList(), function($item): ProfileWithNationality {
  1526.             return new ProfileWithNationality($item);
  1527.         });
  1528.         $apiEndpoint '/city/{city}/nationality/'.$type;
  1529.         $result $this->paginatedListing($city$apiEndpoint, ['city' => $city->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_BY_PARAMS$response);
  1530.         return $this->render('ProfileList/list.html.twig', [
  1531.             'profiles' => $result,
  1532.             'source' => $this->source,
  1533.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1534.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1535.                 'city' => $city->getUriIdentity(),
  1536.                 'nationality' => $nationality,
  1537.                 'page' => $this->getCurrentPageNumber()
  1538.             ]),
  1539.             'recommendationSpec' => $specs->recommendationSpec(),
  1540.         ], response$response);
  1541.     }
  1542.     #[ParamConverter("city"converter"city_converter")]
  1543.     #[ParamConverter("service"options: ['mapping' => ['service' => 'uriIdentity']])]
  1544.     public function listByProvidedService(Request $requestCity $cityService $service): Response
  1545.     {
  1546.         $specs $this->profileListSpecificationService->listByProvidedService($service$city);
  1547.         $response = new Response();
  1548.         $sameGroupServices $this->serviceRepository->findBy(['group' => $service->getGroup()]);
  1549.         $alternativeSpec $this->getORSpecForItemsArray([$sameGroupServices], function($item): ProfileIsProvidingOneOfServices {
  1550.             return new ProfileIsProvidingOneOfServices($item);
  1551.         });
  1552.         $result $this->paginatedListing($city'/city/{city}/service/{service}', ['city' => $city->getId(), 'service' => $service->getId()], $specs->spec(), $alternativeSpecself::RESULT_SOURCE_SERVICE$response);
  1553.         return $this->render('ProfileList/list.html.twig', [
  1554.             'profiles' => $result,
  1555.             'source' => $this->source,
  1556.             'source_default' => self::RESULT_SOURCE_SERVICE,
  1557.             'service' => $service,
  1558.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1559.                 'city' => $city->getUriIdentity(),
  1560.                 'service' => $service->getUriIdentity(),
  1561.                 'page' => $this->getCurrentPageNumber()
  1562.             ]),
  1563.             'recommendationSpec' => $specs->recommendationSpec(),
  1564.         ], response$response);
  1565.     }
  1566.     /**
  1567.      * @Feature("has_archive_page")
  1568.      */
  1569.     #[ParamConverter("city"converter"city_converter")]
  1570.     public function listArchived(Request $requestCity $city): Response
  1571.     {
  1572.         $result $this->profileList->list($citynullnullnullfalsenullProfileList::ORDER_BY_UPDATED);
  1573.         return $this->render('ProfileList/list.html.twig', [
  1574.             'profiles' => $result,
  1575.             'recommendationSpec' => new \App\Specification\ElasticSearch\ProfileIsNotArchived(), //ProfileIsArchived, согласно https://redminez.net/issues/28305 в реках выводятся неарзивные
  1576.         ]);
  1577.     }
  1578.     #[ParamConverter("city"converter"city_converter")]
  1579.     public function listNew(City $cityint $weeks 2): Response
  1580.     {
  1581.         $specs $this->profileListSpecificationService->listNew($weeks);
  1582.         $response = new Response();
  1583.         $result $this->paginatedListing($city'/city/{city}/recent', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  1584.         return $this->render('ProfileList/list.html.twig', [
  1585.             'profiles' => $result,
  1586.             'recommendationSpec' => $specs->recommendationSpec(),
  1587.         ], response$response);
  1588.     }
  1589.     #[ParamConverter("city"converter"city_converter")]
  1590.     public function listByNoRetouch(City $city): Response
  1591.     {
  1592.         $specs $this->profileListSpecificationService->listByNoRetouch();
  1593.         $response = new Response();
  1594.         $result $this->paginatedListing($city'/city/{city}/noretouch', ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1595.         return $this->render('ProfileList/list.html.twig', [
  1596.             'profiles' => $result,
  1597.             'profiles_count' => $result->count(),
  1598.             'source' => $this->source,
  1599.             'recommendationSpec' => $specs->recommendationSpec(),
  1600.         ], response$response);
  1601.     }
  1602.     #[ParamConverter("city"converter"city_converter")]
  1603.     public function listByNice(City $city): Response
  1604.     {
  1605.         $specs $this->profileListSpecificationService->listByNice();
  1606.         $response = new Response();
  1607.         $result $this->paginatedListing($city'/city/{city}/nice', ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1608.         return $this->render('ProfileList/list.html.twig', [
  1609.             'profiles' => $result,
  1610.             'source' => $this->source,
  1611.             'recommendationSpec' => $specs->recommendationSpec(),
  1612.         ], response$response);
  1613.     }
  1614.     #[ParamConverter("city"converter"city_converter")]
  1615.     public function listByOnCall(City $city): Response
  1616.     {
  1617.         $specs $this->profileListSpecificationService->listByOnCall();
  1618.         $response = new Response();
  1619.         $result $this->paginatedListing($city'/city/{city}/oncall', ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1620.         return $this->render('ProfileList/list.html.twig', [
  1621.             'profiles' => $result,
  1622.             'source' => $this->source,
  1623.             'recommendationSpec' => $specs->recommendationSpec(),
  1624.         ], response$response);
  1625.     }
  1626.     #[ParamConverter("city"converter"city_converter")]
  1627.     public function listForNight(City $city): Response
  1628.     {
  1629.         $specs $this->profileListSpecificationService->listForNight();
  1630.         $response = new Response();
  1631.         $result $this->paginatedListing($city'/city/{city}/fornight', ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1632.         return $this->render('ProfileList/list.html.twig', [
  1633.             'profiles' => $result,
  1634.             'source' => $this->source,
  1635.             'recommendationSpec' => $specs->recommendationSpec(),
  1636.         ], response$response);
  1637.     }
  1638.     private function getSpecForEliteGirls(City $city): Filter
  1639.     {
  1640.         $minPrice $this->countryCurrencyResolver->getValueByCountryCode($city->getCountryCode(), [
  1641.             'RUB' => 5000,
  1642.             'UAH' => 1500,
  1643.             'USD' => 100,
  1644.             'EUR' => 130,
  1645.         ]);
  1646.         return new ProfileIsElite($minPrice);
  1647.     }
  1648.     private function getElasticSearchSpecForEliteGirls(City $city): ISpecification
  1649.     {
  1650.         $minPrice $this->countryCurrencyResolver->getValueByCountryCode($city->getCountryCode(), [
  1651.             'RUB' => 5000,
  1652.             'UAH' => 1500,
  1653.             'USD' => 100,
  1654.             'EUR' => 130,
  1655.         ]);
  1656.         return new \App\Specification\ElasticSearch\ProfileIsElite($minPrice);
  1657.     }
  1658.     #[ParamConverter("city"converter"city_converter")]
  1659.     public function listForEliteGirls(CountryCurrencyResolver $countryCurrencyResolverRequest $requestCity $city): Response
  1660.     {
  1661.         $specs $this->profileListSpecificationService->listForEliteGirls($city);
  1662.         $response = new Response();
  1663.         $result $this->paginatedListing($city'/city/{city}/elite', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  1664.         return $this->render('ProfileList/list.html.twig', [
  1665.             'profiles' => $result,
  1666.             'source' => $this->source,
  1667.             'source_default' => self::RESULT_SOURCE_BY_PARAMS,
  1668.             'category_url' => $this->generateUrl($request->attributes->get('_route'), [
  1669.                 'city' => $city->getUriIdentity(),
  1670.                 'page' => $this->getCurrentPageNumber()
  1671.             ]),
  1672.             'recommendationSpec' => $specs->recommendationSpec(),
  1673.         ], response$response);
  1674.     }
  1675.     #[ParamConverter("city"converter"city_converter")]
  1676.     public function listForRealElite(CountryCurrencyResolver $countryCurrencyResolverCity $city): Response
  1677.     {
  1678.         $specs $this->profileListSpecificationService->listForRealElite($city);
  1679.         $response = new Response();
  1680.         $result $this->paginatedListing($city'/city/{city}/realelite', ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1681.         return $this->render('ProfileList/list.html.twig', [
  1682.             'profiles' => $result,
  1683.             'source' => $this->source,
  1684.             'recommendationSpec' => $specs->recommendationSpec(),
  1685.         ], response$response);
  1686.     }
  1687.     #[ParamConverter("city"converter"city_converter")]
  1688.     public function listForVipPros(CountryCurrencyResolver $countryCurrencyResolverCity $city): Response
  1689.     {
  1690.         $specs $this->profileListSpecificationService->listForVipPros($city);
  1691.         $response = new Response();
  1692.         $result $this->paginatedListing($city'/city/{city}/vip', ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1693.         return $this->render('ProfileList/list.html.twig', [
  1694.             'profiles' => $result,
  1695.             'source' => $this->source,
  1696.             'recommendationSpec' => $specs->recommendationSpec(),
  1697.         ], response$response);
  1698.     }
  1699.     #[ParamConverter("city"converter"city_converter")]
  1700.     public function listForVipIndividual(CountryCurrencyResolver $countryCurrencyResolverCity $city): Response
  1701.     {
  1702.         $specs $this->profileListSpecificationService->listForVipIndividual($city);
  1703.         $response = new Response();
  1704.         $result $this->paginatedListing($city'/city/{city}/vipindi', ['city' => $city->getId()], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1705.         return $this->render('ProfileList/list.html.twig', [
  1706.             'profiles' => $result,
  1707.             'source' => $this->source,
  1708.             'recommendationSpec' => $specs->recommendationSpec(),
  1709.         ], response$response);
  1710.     }
  1711.     #[ParamConverter("city"converter"city_converter")]
  1712.     public function listForVipGirlsCity(City $city): Response
  1713.     {
  1714.         $specs $this->profileListSpecificationService->listForVipGirlsCity($city);
  1715.         $response = new Response();
  1716.         $result $this->paginatedListing($citynull, [], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1717.         return $this->render('ProfileList/list.html.twig', [
  1718.             'profiles' => $result,
  1719.             'source' => $this->source,
  1720.             'recommendationSpec' => $specs->recommendationSpec(),
  1721.         ], response$response);
  1722.     }
  1723.     #[ParamConverter("city"converter"city_converter")]
  1724.     public function listOfGirlfriends(City $city): Response
  1725.     {
  1726.         $specs $this->profileListSpecificationService->listOfGirlfriends();
  1727.         $response = new Response();
  1728.         $result $this->paginatedListing($citynull, [], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1729.         return $this->render('ProfileList/list.html.twig', [
  1730.             'profiles' => $result,
  1731.             'source' => $this->source,
  1732.             'recommendationSpec' => $specs->recommendationSpec(),
  1733.         ]);
  1734.     }
  1735.     #[ParamConverter("city"converter"city_converter")]
  1736.     public function listOfMostExpensive(City $city): Response
  1737.     {
  1738.         $specs $this->profileListSpecificationService->listOfMostExpensive($city);
  1739.         $response = new Response();
  1740.         $result $this->paginatedListing($citynull, [], $specs->spec(), nullself::RESULT_SOURCE_CITY$response);
  1741.         return $this->render('ProfileList/list.html.twig', [
  1742.             'profiles' => $result,
  1743.             'source' => $this->source,
  1744.             'recommendationSpec' => $specs->recommendationSpec(),
  1745.         ]);
  1746.     }
  1747.     #[ParamConverter("city"converter"city_converter")]
  1748.     public function listBdsm(City $cityServiceRepository $serviceRepositoryParameterBagInterface $parameterBag): Response
  1749.     {
  1750.         $specs $this->profileListSpecificationService->listBdsm();
  1751.         $response = new Response();
  1752.         $result $this->paginatedListing($city'/city/{city}/bdsm', ['city' => $city->getId()], $specs->spec(), nullnull$response);
  1753.         return $this->render('ProfileList/list.html.twig', [
  1754.             'profiles' => $result,
  1755.             'recommendationSpec' => $specs->recommendationSpec(),
  1756.         ], response$response);
  1757.     }
  1758.     #[ParamConverter("city"converter"city_converter")]
  1759.     public function listByGender(City $citystring $genderDefaultCityProvider $defaultCityProvider): Response
  1760.     {
  1761.         if ($city->getId() != $defaultCityProvider->getDefaultCity()->getId()) {
  1762.             throw $this->createNotFoundException();
  1763.         }
  1764.         if (null === Genders::getValueByUriIdentity($gender))
  1765.             throw $this->createNotFoundException();
  1766.         $specs $this->profileListSpecificationService->listByGender($gender);
  1767.         $response = new Response();
  1768.         $result $this->paginatedListing($citynull, [], $specs->spec(), nullnull$response);
  1769.         return $this->render('ProfileList/list.html.twig', [
  1770.             'profiles' => $result,
  1771.             'recommendationSpec' => $specs->recommendationSpec(),
  1772.         ]);
  1773.     }
  1774.     /**
  1775.      * Сейчас не используется, решили доставать их всех соседних подкатегорий разом.
  1776.      * Пока оставил, вдруг передумают.
  1777.      * @deprecated
  1778.      */
  1779.     public function listByNextSimilarCategories(callable $listMethod$requestCategory, array $similarItems): ORMQueryResult
  1780.     {
  1781.         $similarItems array_filter($similarItems, function ($item) use ($requestCategory): bool {
  1782.             return $item != $requestCategory;
  1783.         });
  1784.         //shuffle($similarItems);
  1785.         $item null;
  1786.         $result null;
  1787.         do {
  1788.             $item $item == null current($similarItems) : next($similarItems);
  1789.             if (false === $item)
  1790.                 return $result;
  1791.             $result $listMethod($item);
  1792.         } while ($result->count() == 0);
  1793.         return $result;
  1794.     }
  1795.     private function shouldShowHomepageCityListingsBlock(City $cityint $pagebool $subRequest): bool
  1796.     {
  1797.         if ($page !== 1) {
  1798.             return false;
  1799.         }
  1800.         if ($subRequest) {
  1801.             return true;
  1802.         }
  1803.         return !$city->equals($this->parameterBag->get('default_city'));
  1804.     }
  1805.     protected function getCurrentPageNumber(): int
  1806.     {
  1807.         $page = (int) $this->requestStack->getCurrentRequest()?->get($this->pageParameter1);
  1808.         if ($page 1) {
  1809.             $page 1;
  1810.         }
  1811.         return $page;
  1812.     }
  1813.     protected function render(string $view, array $parameters = [], Response $response null): Response
  1814.     {
  1815.         $parameters $this->fillListingWithRecommendations($parameters);
  1816.         $this->listingService->setCurrentListingPage($parameters['profiles']);
  1817.         $requestAttrs $this->requestStack->getCurrentRequest();
  1818.         $listing $requestAttrs->get('_controller');
  1819.         $listing is_array($listing) ? $listing[count($listing) - 1] : $listing;
  1820.         $listing preg_replace('/[^:]+::/'''$listing);
  1821.         $listingParameters $requestAttrs->get('_route_params');
  1822.         $listingParameters is_array($listingParameters) ? $listingParameters : [];
  1823.         $mainRequestHasPageParam = isset(($this->requestStack->getMainRequest()->get('_route_params') ?? [])['page']);
  1824.         if ($this->requestStack->getCurrentRequest()->isXmlHttpRequest()) {
  1825.             $view = (
  1826.                 str_starts_with($listing'list')
  1827.                 && 'ProfileList/list.html.twig' === $view
  1828.                 && $mainRequestHasPageParam //isset($listingParameters['page'])
  1829.             )
  1830.                 ? 'ProfileList/list.profiles.html.twig'
  1831.                 $view;
  1832.             return $this->prepareForXhr(parent::render($view$parameters$response));
  1833.             //return $this->getJSONResponse($parameters);
  1834.         } else {
  1835.             $parameters array_merge($parameters, [
  1836.                 'listing' => $listing,
  1837.                 'listing_parameters' => $listingParameters,
  1838.             ]);
  1839.             return parent::render($view$parameters$response);
  1840.         }
  1841.     }
  1842.     private function fillListingWithRecommendations(array $parameters): array
  1843.     {
  1844.         $parameters['recommendations_fill_applied'] = $parameters['recommendations_fill_applied'] ?? false;
  1845.         if (!($parameters['profiles'] ?? null) instanceof Page) {
  1846.             return $parameters;
  1847.         }
  1848.         $city $this->requestStack->getCurrentRequest()?->attributes->get('city');
  1849.         if (!$city instanceof City) {
  1850.             return $parameters;
  1851.         }
  1852.         $recommendationSpec $parameters['recommendationSpec'] ?? null;
  1853.         if (!$recommendationSpec instanceof ISpecification) {
  1854.             $recommendationSpec null;
  1855.         }
  1856.         $filled $this->profileListingRecommendationsFiller->fill(
  1857.             $city,
  1858.             $parameters['profiles'],
  1859.             $recommendationSpec,
  1860.             $this->resolveRecommendationGenders(),
  1861.         );
  1862.         $parameters['profiles'] = $filled['profiles'];
  1863.         $parameters['recommendations_fill_applied'] = $filled['applied'];
  1864.         $parameters['recommendations_fill_original_count'] = $filled['original_count'];
  1865.         return $parameters;
  1866.     }
  1867.     private function resolveRecommendationGenders(): array
  1868.     {
  1869.         $gender $this->requestStack->getCurrentRequest()?->attributes->get('gender');
  1870.         if (is_string($gender) && null !== Genders::getValueByUriIdentity($gender)) {
  1871.             return [Genders::getValueByUriIdentity($gender)];
  1872.         }
  1873.         return [Genders::FEMALE];
  1874.     }
  1875.     private function listActiveWithinCityOrderedByStatusWithSpecAvoidingTopPlacementLimited(
  1876.         City $city,
  1877.         ?Filter $spec,
  1878.         array $additionalSpecs null,
  1879.         array $genders = [Genders::FEMALE],
  1880.         int $limit 0,
  1881.     ): array|Page {
  1882.         return $this->profileList->listActiveWithinCityOrderedByStatusWithSpecLimited($city$spec$additionalSpecs$genderstrue$limit);
  1883.     }
  1884.     private function listRandomSinglePage(
  1885.         City $city,
  1886.         ?string $country,
  1887.         ?Filter $spec,
  1888.         ?array $additionalSpecs,
  1889.         bool $active,
  1890.         ?bool $masseur false,
  1891.         array $genders = [Genders::FEMALE]
  1892.     ): Page {
  1893.         return $this->profileList->listRandom($city$country$spec$additionalSpecs$active$masseur$genderstrue);
  1894.     }
  1895.     private function shuffleProfilesOnPage(Page $result): Page
  1896.     {
  1897.         $profiles iterator_to_array($result->getIterator());
  1898.         if(count($profiles) > 1) {
  1899.             shuffle($profiles);
  1900.         }
  1901.         return new FakeORMQueryPage(
  1902.             $result->getCurrentOffset(),
  1903.             $result->getCurrentPage(),
  1904.             $result->getCurrentLimit(),
  1905.             $result->totalCount(),
  1906.             $profiles
  1907.         );
  1908.     }
  1909.     /**
  1910.      * Достает из списка анкет их id с учетом совместимости разных форматов данных
  1911.      */
  1912.     private function extractProfileIds(array $profiles): array
  1913.     {
  1914.         $ids array_map(static function ($item) {
  1915.             /**
  1916.              * - array - данные из микросервиса ротации через API
  1917.              * - Profile::getId() - полноценная сущность анкеты
  1918.              * - ProfileListingReadModel::$id - read-model анкеты
  1919.              */
  1920.             return is_array($item) ? $item['id'] : ($item?->id ?? $item?->getId());
  1921.         }, $profiles);
  1922.         return array_filter($ids); // remove null values
  1923.     }
  1924. //    protected function getJSONResponse(array $parameters)
  1925. //    {
  1926. //        $request = $this->request;
  1927. //        $data = json_decode($request->getContent(), true);
  1928. //
  1929. //        $imageSize = !empty($data['imageSize']) ? $data['imageSize'] : "357x500";
  1930. //
  1931. //        /** @var FakeORMQueryPage $queryPage */
  1932. //        $queryPage = $parameters['profiles'];
  1933. //
  1934. //        $profiles = array_map(function(ProfileListingReadModel $profile) use ($imageSize) {
  1935. //            $profile->stations = array_values($profile->stations);
  1936. //            $profile->avatar['path'] = $this->responsiveAssetsService->getResponsiveImageUrl($profile->avatar['path'], 'profile_media', $imageSize, 'jpg');
  1937. //            $profile->uri = $this->generateUrl('profile_preview.page', ['city' => $profile->city->uriIdentity, 'profile' => $profile->uriIdentity]);
  1938. //            return $profile;
  1939. //        }, $queryPage->getArray());
  1940. //
  1941. //        return new JsonResponse([
  1942. //            'profiles' => $profiles,
  1943. //            'currentPage' => $queryPage->getCurrentPage(),
  1944. //        ], Response::HTTP_OK);
  1945. //    }
  1946. }