src/Controller/Front/PoolGraphController.php line 342

Open in your IDE?
  1. <?php
  2. // src/Controller/PoolGraphController.php
  3. namespace App\Controller\Front;
  4. use App\Controller\CustomController;
  5. use App\Entity\HttParsing;
  6. use App\Entity\PoolProgram;
  7. use App\Entity\PoolProgramType;
  8. use App\Service\CurrencyService;
  9. use App\Service\HttGraph\GraphAmortisation;
  10. use App\Service\HttGraph\GraphAmortisationOvertime;
  11. use App\Service\HttGraph\GraphBreakdownByInterestRate;
  12. use App\Service\HttGraph\GraphBreakdownByInterestRateOvertime;
  13. use App\Service\HttGraph\GraphBreakdownByRepaymentType;
  14. use App\Service\HttGraph\GraphBreakdownByRepaymentTypeOvertime;
  15. use App\Service\HttGraph\GraphBreakdownByTypeOfDebtor;
  16. use App\Service\HttGraph\GraphBreakdownByTypeOfDebtorOvertime;
  17. use App\Service\HttGraph\GraphBreakdownByTypeOfShip;
  18. use App\Service\HttGraph\GraphBreakdownByTypeOfShipOvertime;
  19. use App\Service\HttGraph\GraphConcentrationRisks;
  20. use App\Service\HttGraph\GraphConcentrationRisksOvertime;
  21. use App\Service\HttGraph\GraphCurrencyBreakdownCoverAssets;
  22. use App\Service\HttGraph\GraphCurrencyBreakdownCoverAssetsOvertime;
  23. use App\Service\HttGraph\GraphCurrencyBreakdownCoveredBonds;
  24. use App\Service\HttGraph\GraphCurrencyBreakdownCoveredBondsOvertime;
  25. use App\Service\HttGraph\GraphGeographicBreakdownDomestic;
  26. use App\Service\HttGraph\GraphGeographicBreakdownInternational;
  27. use App\Service\HttGraph\GraphInterestRateBreakdown;
  28. use App\Service\HttGraph\GraphInterestRateBreakdownOvertime;
  29. use App\Service\HttGraph\GraphLoanSeasoningBar;
  30. use App\Service\HttGraph\GraphLoanSeasoningOvertime;
  31. use App\Service\HttGraph\GraphLoanSizeInformationCommercial;
  32. use App\Service\HttGraph\GraphLoanSizeInformationResidential;
  33. use App\Service\HttGraph\GraphLtvDistributionIndexed;
  34. use App\Service\HttGraph\GraphLtvDistributionIndexedOvertime;
  35. use App\Service\HttGraph\GraphLtvDistributionUnindexed;
  36. use App\Service\HttGraph\GraphLtvDistributionUnindexedOvertime;
  37. use App\Service\HttGraph\GraphOvercollateralisation;
  38. use App\Service\HttGraph\GraphOvercollateralisationOvertime;
  39. use App\Service\HttGraph\GraphOvercollateralisationOvertimeOc;
  40. use App\Service\HttGraph\GraphTypeTenureCommercial;
  41. use App\Service\HttGraph\GraphTypeTenureResidential;
  42. use App\Service\HttGraph\GraphTypeTenureResidentialOvertime;
  43. use App\Service\HttParser\Table\TableCurrencyBreakdownCoverAssets;
  44. use App\Service\HttParser\Table\TableCurrencyBreakdownCoverBonds;
  45. use App\Service\HttParser\Table\TableLoanSeasoningBar;
  46. use App\Service\HttService;
  47. use App\Service\PoolService;
  48. use Doctrine\ORM\EntityManagerInterface;
  49. use Symfony\Component\HttpFoundation\JsonResponse;
  50. use Symfony\Component\HttpFoundation\Request;
  51. use Symfony\Component\HttpFoundation\RequestStack;
  52. use Symfony\Component\Routing\Annotation\Route;
  53. use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
  54. class PoolGraphController extends CustomController
  55. {
  56.     protected CurrencyService $currencyService;
  57.     protected PoolService $poolService;
  58.     public function __construct(
  59.         EntityManagerInterface $em,
  60.         RequestStack $requestStack,
  61.         CurrencyService $currencyService,
  62.         PoolService $poolService
  63.     )
  64.     {
  65.         parent::__construct($em$requestStack);
  66.         $this->currencyService $currencyService;
  67.         $this->poolService $poolService;
  68.     }
  69.     /**
  70.      * @Route("/pool/{id}/graph/{parsingId}/overcollateralisation", name="public_pool_graph_overcollateralisation")
  71.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  72.      */
  73.     public function overcollateralisation(Request $requestPoolProgram $poolHttParsing $parsingHttService $httService)
  74.     {
  75.         $preview $request->get('preview') == 1;
  76.         $this->denyAccessUnlessGranted('view'$pool);
  77.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  78.         $httService->setParsing($parsing);
  79.         // list of other pools for the htt cutoffdate dropdown selector
  80.         $pools $this->em->getRepository(PoolProgram::class)
  81.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  82.         return $this->render('front/pool/graph/overcollateralisation.html.twig', [
  83.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  84.             'httService' => $httService,
  85.             'parsing' => $parsing,
  86.             'pool' => $pool,
  87.             'issuer' => $pool->getIssuer(),
  88.             'preview' => $preview,
  89.             'pools' => $pools,
  90.         ]);
  91.     }
  92.     /**
  93.      * @Route("/pool/{id}/graph/{parsingId}/overcollateralisation/data", name="public_pool_graph_overcollateralisation_data")
  94.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  95.      */
  96.     public function graphOvercollateralisationData(Request $requestPoolProgram $poolHttParsing $parsingGraphOvercollateralisation $graphService)
  97.     {
  98.         $data $graphService
  99.             ->setPool($pool)
  100.             ->setParsing($parsing)
  101.             ->getData($request->get('preview') == 1);
  102.         return new JsonResponse($data);
  103.     }
  104.     /**
  105.      * @Route("/pool/{id}/graph/{parsingId}/overcollateralisation-overtime/data", name="public_pool_graph_overcollateralisation_overtime_data")
  106.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  107.      */
  108.     public function graphOvercollateralisationOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphOvercollateralisationOvertime $graphService)
  109.     {
  110.         $data $graphService
  111.             ->setPool($pool)
  112.             ->setParsing($parsing)
  113.             ->getData($request->get('preview') == 1);
  114.         return new JsonResponse($data);
  115.     }
  116.     /**
  117.      * @Route("/pool/{id}/graph/{parsingId}/overcollateralisation-overtime-oc/data", name="public_pool_graph_overcollateralisation_overtime_oc_data")
  118.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  119.      */
  120.     public function graphOvercollateralisationOvertimeOcData(Request $requestPoolProgram $poolHttParsing $parsingGraphOvercollateralisationOvertimeOc $graphService)
  121.     {
  122.         $data $graphService
  123.             ->setPool($pool)
  124.             ->setParsing($parsing)
  125.             ->getData($request->get('preview') == 1);
  126.         return new JsonResponse($data);
  127.     }
  128.     /**
  129.      * @Route("/pool/{id}/graph/{parsingId}/amortisation", name="public_pool_graph_amortisation")
  130.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  131.      */
  132.     public function amortisation(Request $requestPoolProgram $poolHttParsing $parsingHttService $httService)
  133.     {
  134.         $preview $request->get('preview') == 1;
  135.         $this->denyAccessUnlessGranted('view'$pool);
  136.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  137.         $httService->setParsing($parsing);
  138.         // list of other pools for the htt cutoffdate dropdown selector
  139.         $pools $this->em->getRepository(PoolProgram::class)
  140.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  141.         return $this->render('front/pool/graph/amortisation.html.twig', [
  142.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  143.             'httService' => $httService,
  144.             'parsing' => $parsing,
  145.             'pool' => $pool,
  146.             'issuer' => $pool->getIssuer(),
  147.             'preview' => $preview,
  148.             'pools' => $pools,
  149.         ]);
  150.     }
  151.     /**
  152.      * @Route("/pool/{id}/graph/{parsingId}/amortisation/data", name="public_pool_graph_amortisation_data")
  153.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  154.      */
  155.     public function graphAmortisationData(Request $requestPoolProgram $poolHttParsing $parsingGraphAmortisation $graphService)
  156.     {
  157.         $data $graphService
  158.             ->setPool($pool)
  159.             ->setParsing($parsing)
  160.             ->getData($request->get('preview') == 1);
  161.         return new JsonResponse($data);
  162.     }
  163.     /**
  164.      * @Route("/pool/{id}/graph/{parsingId}/amortisation-overtime/data/{valueName}", name="public_pool_graph_amortisation_overtime_data")
  165.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  166.      */
  167.     public function graphAmortisationOvertimeData(Request $requestPoolProgram $poolHttParsing $parsing$valueNameGraphAmortisationOvertime $graphService)
  168.     {
  169.         $data $graphService
  170.             ->setValueName($valueName)
  171.             ->setPool($pool)
  172.             ->setParsing($parsing)
  173.             ->getData($request->get('preview') == 1);
  174.         return new JsonResponse($data);
  175.     }
  176.     /**
  177.      * @Route("/pool/{id}/graph/{parsingId}/currency-breakdown", name="public_pool_graph_currency_breakdown")
  178.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  179.      */
  180.     public function currencyBreakdown(Request $requestPoolProgram $poolHttParsing $parsingHttService $httService)
  181.     {
  182.         $preview $request->get('preview') == 1;
  183.         $this->denyAccessUnlessGranted('view'$pool);
  184.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  185.         $httService->setParsing($parsing);
  186.         // list of other pools for the htt cutoffdate dropdown selector
  187.         $pools $this->em->getRepository(PoolProgram::class)
  188.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  189.         // get currencies
  190.         $currenciesCoverAssets array_keys($httService->getSerializedValue(TableCurrencyBreakdownCoverAssets::TABLE_NAMETableCurrencyBreakdownCoverAssets::VALUE_NAME_HEDGING));
  191.         $currenciesCoverBonds array_keys($httService->getSerializedValue(TableCurrencyBreakdownCoverBonds::TABLE_NAMETableCurrencyBreakdownCoverBonds::VALUE_NAME_HEDGING));
  192.         return $this->render('front/pool/graph/currency-breakdown.html.twig', [
  193.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  194.             'httService' => $httService,
  195.             'parsing' => $parsing,
  196.             'pool' => $pool,
  197.             'issuer' => $pool->getIssuer(),
  198.             'preview' => $preview,
  199.             'pools' => $pools,
  200.             'currenciesCoverAssets' => $currenciesCoverAssets,
  201.             'currenciesCoverBonds' => $currenciesCoverBonds,
  202.         ]);
  203.     }
  204.     /**
  205.      * @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-cover-assets/data", name="public_pool_graph_currency_breakdown_cover_assets_data")
  206.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  207.      */
  208.     public function graphCurrencyBreakdownCoverAssetsData(Request $requestPoolProgram $poolHttParsing $parsingGraphCurrencyBreakdownCoverAssets $graphService)
  209.     {
  210.         $data $graphService
  211.             ->setPool($pool)
  212.             ->setParsing($parsing)
  213.             ->getData();
  214.         return new JsonResponse($data);
  215.     }
  216.     /**
  217.      * @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-cover-assets-overtime/data/{valueName}", name="public_pool_graph_currency_breakdown_cover_assets_overtime_data")
  218.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  219.      */
  220.     public function graphCurrencyBreakdownCoverAssetsOvertimeData(Request $requestPoolProgram $poolHttParsing $parsing$valueNameGraphCurrencyBreakdownCoverAssetsOvertime $graphService)
  221.     {
  222.         $data $graphService
  223.             ->setValueName($valueName)
  224.             ->setPool($pool)
  225.             ->setParsing($parsing)
  226.             ->getData();
  227.         return new JsonResponse($data);
  228.     }
  229.     /**
  230.      * @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-covered-bonds/data", name="public_pool_graph_currency_breakdown_covered_bonds_data")
  231.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  232.      */
  233.     public function graphCurrencyBreakdownCoveredBondsData(Request $requestPoolProgram $poolHttParsing $parsingGraphCurrencyBreakdownCoveredBonds $graphService)
  234.     {
  235.         $data $graphService
  236.             ->setPool($pool)
  237.             ->setParsing($parsing)
  238.             ->getData();
  239.         return new JsonResponse($data);
  240.     }
  241.     /**
  242.      * @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-covered-bonds-overtime/data/{valueName}", name="public_pool_graph_currency_breakdown_covered_bonds_overtime_data")
  243.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  244.      */
  245.     public function graphCurrencyBreakdownCoveredBondsOvertimeData(Request $requestPoolProgram $poolHttParsing $parsing$valueNameGraphCurrencyBreakdownCoveredBondsOvertime $graphService)
  246.     {
  247.         $data $graphService
  248.             ->setValueName($valueName)
  249.             ->setPool($pool)
  250.             ->setParsing($parsing)
  251.             ->getData();
  252.         return new JsonResponse($data);
  253.     }
  254.     /**
  255.      * @Route("/pool/{id}/graph/{parsingId}/interest-rate-breakdown", name="public_pool_graph_interest_rate_breakdown")
  256.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  257.      */
  258.     public function interestRateBreakdown(Request $requestPoolProgram $poolHttParsing $parsingHttService $httService)
  259.     {
  260.         $preview $request->get('preview') == 1;
  261.         $this->denyAccessUnlessGranted('view'$pool);
  262.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  263.         $httService->setParsing($parsing);
  264.         // list of other pools for the htt cutoffdate dropdown selector
  265.         $pools $this->em->getRepository(PoolProgram::class)
  266.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  267.         return $this->render('front/pool/graph/interest-rate-breakdown.html.twig', [
  268.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  269.             'httService' => $httService,
  270.             'parsing' => $parsing,
  271.             'pool' => $pool,
  272.             'issuer' => $pool->getIssuer(),
  273.             'preview' => $preview,
  274.             'pools' => $pools,
  275.         ]);
  276.     }
  277.     /**
  278.      * @Route("/pool/{id}/graph/{parsingId}/interest-rate-breakdown/data", name="public_pool_graph_interest_rate_breakdown_data")
  279.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  280.      */
  281.     public function interestRateBreakdownData(Request $requestPoolProgram $poolHttParsing $parsingGraphInterestRateBreakdown $graphService)
  282.     {
  283.         $data $graphService
  284.             ->setPool($pool)
  285.             ->setParsing($parsing)
  286.             ->getData();
  287.         return new JsonResponse($data);
  288.     }
  289.     /**
  290.      * @Route("/pool/{id}/graph/{parsingId}/interest-rate-breakdown-overtime/data/{valueName}", name="public_pool_graph_interest_rate_breakdown_overtime_data")
  291.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  292.      */
  293.     public function interestRateBreakdownOvertimeData(Request $requestPoolProgram $poolHttParsing $parsing$valueNameGraphInterestRateBreakdownOvertime $graphService)
  294.     {
  295.         $data $graphService
  296.             ->setValueName($valueName)
  297.             ->setPool($pool)
  298.             ->setParsing($parsing)
  299.             ->getData();
  300.         return new JsonResponse($data);
  301.     }
  302.     /**
  303.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-interest-rate/{poolType}", name="public_pool_graph_breakdown_by_interest_rate")
  304.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  305.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  306.      */
  307.     public function breakdownByInterestRate(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  308.     {
  309.         $preview $request->get('preview') == 1;
  310.         $this->denyAccessUnlessGranted('view'$pool);
  311.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  312.         $httService->setParsing($parsing);
  313.         // list of other pools for the htt cutoffdate dropdown selector
  314.         $pools $this->em->getRepository(PoolProgram::class)
  315.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  316.         return $this->render('front/pool/graph/breakdown-by-interest-rate.html.twig', [
  317.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  318.             'httService' => $httService,
  319.             'parsing' => $parsing,
  320.             'pool' => $pool,
  321.             'poolType' => $poolType,
  322.             'issuer' => $pool->getIssuer(),
  323.             'preview' => $preview,
  324.             'pools' => $pools,
  325.         ]);
  326.     }
  327.     /**
  328.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-interest-rate/{poolType}/data", name="public_pool_graph_breakdown_by_interest_rate_data")
  329.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  330.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  331.      */
  332.     public function breakdownByInterestRateData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByInterestRate $graphServicePoolProgramType $poolType)
  333.     {
  334.         $data $graphService
  335.             ->setPool($pool)
  336.             ->setPoolType($poolType)
  337.             ->setParsing($parsing)
  338.             ->getData();
  339.         return new JsonResponse($data);
  340.     }
  341.     /**
  342.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-interest-rate-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_interest_rate_overtime_data")
  343.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  344.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  345.      */
  346.     public function breakdownByInterestRateOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByInterestRateOvertime $graphServicePoolProgramType $poolType)
  347.     {
  348.         $data $graphService
  349.             ->setPool($pool)
  350.             ->setPoolType($poolType)
  351.             ->setParsing($parsing)
  352.             ->getData($request->get('preview') == 1);
  353.         return new JsonResponse($data);
  354.     }
  355.     /**
  356.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-repayment-type/{poolType}", name="public_pool_graph_breakdown_by_repayment_type")
  357.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  358.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  359.      */
  360.     public function breakdownByRepaymentType(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  361.     {
  362.         $preview $request->get('preview') == 1;
  363.         $this->denyAccessUnlessGranted('view'$pool);
  364.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  365.         $httService->setParsing($parsing);
  366.         // list of other pools for the htt cutoffdate dropdown selector
  367.         $pools $this->em->getRepository(PoolProgram::class)
  368.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  369.         return $this->render('front/pool/graph/breakdown-by-repayment-type.html.twig', [
  370.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  371.             'httService' => $httService,
  372.             'parsing' => $parsing,
  373.             'pool' => $pool,
  374.             'poolType' => $poolType,
  375.             'issuer' => $pool->getIssuer(),
  376.             'preview' => $preview,
  377.             'pools' => $pools,
  378.         ]);
  379.     }
  380.     /**
  381.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-repayment-type/{poolType}/data", name="public_pool_graph_breakdown_by_repayment_type_data")
  382.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  383.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  384.      */
  385.     public function breakdownByRepaymentTypeData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByRepaymentType $graphServicePoolProgramType $poolType)
  386.     {
  387.         $data $graphService
  388.             ->setPool($pool)
  389.             ->setPoolType($poolType)
  390.             ->setParsing($parsing)
  391.             ->getData();
  392.         return new JsonResponse($data);
  393.     }
  394.     /**
  395.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-repayment-type-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_repayment_type_overtime_data")
  396.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  397.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  398.      */
  399.     public function breakdownByRepaymentTypeOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByRepaymentTypeOvertime $graphServicePoolProgramType $poolType)
  400.     {
  401.         $data $graphService
  402.             ->setPool($pool)
  403.             ->setPoolType($poolType)
  404.             ->setParsing($parsing)
  405.             ->getData($request->get('preview') == 1);
  406.         return new JsonResponse($data);
  407.     }
  408.     /**
  409.      * @Route("/pool/{id}/graph/{parsingId}/loan-seasoning/{poolType}", name="public_pool_graph_loan_seasoning")
  410.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  411.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  412.      */
  413.     public function loanSeasoning(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  414.     {
  415.         $preview $request->get('preview') == 1;
  416.         $this->denyAccessUnlessGranted('view'$pool);
  417.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  418.         $httService->setParsing($parsing);
  419.         // list of other pools for the htt cutoffdate dropdown selector
  420.         $pools $this->em->getRepository(PoolProgram::class)
  421.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  422.         return $this->render('front/pool/graph/loan-seasoning.html.twig', [
  423.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  424.             'httService' => $httService,
  425.             'parsing' => $parsing,
  426.             'pool' => $pool,
  427.             'poolType' => $poolType,
  428.             'issuer' => $pool->getIssuer(),
  429.             'preview' => $preview,
  430.             'pools' => $pools,
  431.         ]);
  432.     }
  433.     /**
  434.      * @Route("/pool/{id}/graph/{parsingId}/loan-seasoning/{poolType}/data", name="public_pool_graph_loan_seasoning_data")
  435.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  436.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  437.      */
  438.     public function loanSeasoningData(Request $requestPoolProgram $poolHttParsing $parsingGraphLoanSeasoningBar $graphServicePoolProgramType $poolType)
  439.     {
  440.         $data $graphService
  441.             ->setPool($pool)
  442.             ->setPoolType($poolType)
  443.             ->setParsing($parsing)
  444.             ->getData();
  445.         return new JsonResponse($data);
  446.     }
  447.     /**
  448.      * @Route("/pool/{id}/graph/{parsingId}/loan-seasoning-overtime-total/{poolType}/data", name="public_pool_graph_loan_seasoning_overtime_total_data")
  449.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  450.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  451.      */
  452.     public function loanSeasoningOvertimeTotalData(Request $requestPoolProgram $poolHttParsing $parsingGraphLoanSeasoningOvertime $graphServicePoolProgramType $poolType)
  453.     {
  454.         $data $graphService
  455.             ->setPool($pool)
  456.             ->setPoolType($poolType)
  457.             ->setParsing($parsing)
  458.             ->getData();
  459.         return new JsonResponse($data);
  460.     }
  461.     /**
  462.      * @Route("/pool/{id}/graph/{parsingId}/loan-size-information/{poolType}", name="public_pool_graph_loan_size_information")
  463.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  464.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  465.      */
  466.     public function loanSizeInformation(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  467.     {
  468.         $preview $request->get('preview') == 1;
  469.         $this->denyAccessUnlessGranted('view'$pool);
  470.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  471.         $httService->setParsing($parsing);
  472.         // list of other pools for the htt cutoffdate dropdown selector
  473.         $pools $this->em->getRepository(PoolProgram::class)
  474.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  475.         return $this->render('front/pool/graph/loan-size-information.html.twig', [
  476.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  477.             'httService' => $httService,
  478.             'parsing' => $parsing,
  479.             'pool' => $pool,
  480.             'poolType' => $poolType,
  481.             'issuer' => $pool->getIssuer(),
  482.             'preview' => $preview,
  483.             'pools' => $pools,
  484.         ]);
  485.     }
  486.     /**
  487.      * @Route("/pool/{id}/graph/{parsingId}/loan-size-information-residential/{poolType}/data", name="public_pool_graph_loan_size_information_residential_data")
  488.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  489.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  490.      */
  491.     public function loanSizeInformationResidentialData(Request $requestPoolProgram $poolHttParsing $parsingGraphLoanSizeInformationResidential $graphServicePoolProgramType $poolType)
  492.     {
  493.         $data $graphService
  494.             ->setPool($pool)
  495.             ->setPoolType($poolType)
  496.             ->setParsing($parsing)
  497.             ->getData();
  498.         return new JsonResponse($data);
  499.     }
  500.     /**
  501.      * @Route("/pool/{id}/graph/{parsingId}/loan-size-information-commercial/{poolType}/data", name="public_pool_graph_loan_size_information_commercial_data")
  502.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  503.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  504.      */
  505.     public function loanSizeInformationCommercialData(Request $requestPoolProgram $poolHttParsing $parsingGraphLoanSizeInformationCommercial $graphServicePoolProgramType $poolType)
  506.     {
  507.         $data $graphService
  508.             ->setPool($pool)
  509.             ->setPoolType($poolType)
  510.             ->setParsing($parsing)
  511.             ->getData();
  512.         return new JsonResponse($data);
  513.     }
  514.     /**
  515.      * @Route("/pool/{id}/graph/{parsingId}/ltv/{poolType}", name="public_pool_graph_ltv")
  516.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  517.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  518.      */
  519.     public function ltv(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  520.     {
  521.         $preview $request->get('preview') == 1;
  522.         $this->denyAccessUnlessGranted('view'$pool);
  523.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  524.         $httService->setParsing($parsing);
  525.         // list of other pools for the htt cutoffdate dropdown selector
  526.         $pools $this->em->getRepository(PoolProgram::class)
  527.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  528.         return $this->render('front/pool/graph/ltv.html.twig', [
  529.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  530.             'httService' => $httService,
  531.             'parsing' => $parsing,
  532.             'pool' => $pool,
  533.             'poolType' => $poolType,
  534.             'issuer' => $pool->getIssuer(),
  535.             'preview' => $preview,
  536.             'pools' => $pools,
  537.         ]);
  538.     }
  539.     /**
  540.      * @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-indexed/{poolType}/data", name="public_pool_graph_ltv_indexed_data")
  541.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  542.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  543.      */
  544.     public function loanSizeLtvIndexedData(Request $requestPoolProgram $poolHttParsing $parsingGraphLtvDistributionIndexed $graphServicePoolProgramType $poolType)
  545.     {
  546.         $data $graphService
  547.             ->setPool($pool)
  548.             ->setPoolType($poolType)
  549.             ->setParsing($parsing)
  550.             ->getData();
  551.         return new JsonResponse($data);
  552.     }
  553.     /**
  554.      * @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-indexed-overtime/{poolType}/data", name="public_pool_graph_ltv_indexed_overtime_data")
  555.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  556.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  557.      */
  558.     public function loanSizeLtvIndexedOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphLtvDistributionIndexedOvertime $graphServicePoolProgramType $poolType)
  559.     {
  560.         $data $graphService
  561.             ->setPool($pool)
  562.             ->setPoolType($poolType)
  563.             ->setParsing($parsing)
  564.             ->getData($request->get('preview') == 1);
  565.         return new JsonResponse($data);
  566.     }
  567.     /**
  568.      * @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-unindexed/{poolType}/data", name="public_pool_graph_ltv_unindexed_data")
  569.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  570.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  571.      */
  572.     public function loanSizeLtvUnIndexedData(Request $requestPoolProgram $poolHttParsing $parsingGraphLtvDistributionUnindexed $graphServicePoolProgramType $poolType)
  573.     {
  574.         $data $graphService
  575.             ->setPool($pool)
  576.             ->setPoolType($poolType)
  577.             ->setParsing($parsing)
  578.             ->getData();
  579.         return new JsonResponse($data);
  580.     }
  581.     /**
  582.      * @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-unindexed-overtime/{poolType}/data", name="public_pool_graph_ltv_unindexed_overtime_data")
  583.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  584.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  585.      */
  586.     public function loanSizeLtvUnIndexedOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphLtvDistributionUnindexedOvertime $graphServicePoolProgramType $poolType)
  587.     {
  588.         $data $graphService
  589.             ->setPool($pool)
  590.             ->setPoolType($poolType)
  591.             ->setParsing($parsing)
  592.             ->getData($request->get('preview') == 1);
  593.         return new JsonResponse($data);
  594.     }
  595.     /**
  596.      * @Route("/pool/{id}/graph/{parsingId}/type-tenure/{poolType}", name="public_pool_graph_type_tenure")
  597.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  598.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  599.      */
  600.     public function typeTenure(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  601.     {
  602.         $preview $request->get('preview') == 1;
  603.         $this->denyAccessUnlessGranted('view'$pool);
  604.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  605.         $httService->setParsing($parsing);
  606.         // list of other pools for the htt cutoffdate dropdown selector
  607.         $pools $this->em->getRepository(PoolProgram::class)
  608.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  609.         return $this->render('front/pool/graph/type-tenure.html.twig', [
  610.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  611.             'httService' => $httService,
  612.             'parsing' => $parsing,
  613.             'pool' => $pool,
  614.             'poolType' => $poolType,
  615.             'issuer' => $pool->getIssuer(),
  616.             'preview' => $preview,
  617.             'pools' => $pools,
  618.         ]);
  619.     }
  620.     /**
  621.      * @Route("/pool/{id}/graph/{parsingId}/type-tenure-residential/{poolType}/data", name="public_pool_graph_type_tenure_residential_data")
  622.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  623.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  624.      */
  625.     public function typeTenureResidentialData(Request $requestPoolProgram $poolHttParsing $parsingGraphTypeTenureResidential $graphServicePoolProgramType $poolType)
  626.     {
  627.         $data $graphService
  628.             ->setPool($pool)
  629.             ->setPoolType($poolType)
  630.             ->setParsing($parsing)
  631.             ->getData();
  632.         return new JsonResponse($data);
  633.     }
  634.     /**
  635.      * @Route("/pool/{id}/graph/{parsingId}/type-tenure-residential-overtime/{poolType}/data", name="public_pool_graph_type_tenure_residential_overtime_data")
  636.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  637.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  638.      */
  639.     public function typeTenureResidentialOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphTypeTenureResidentialOvertime $graphServicePoolProgramType $poolType)
  640.     {
  641.         $data $graphService
  642.             ->setPool($pool)
  643.             ->setPoolType($poolType)
  644.             ->setParsing($parsing)
  645.             ->getData($request->get('preview') == 1);
  646.         return new JsonResponse($data);
  647.     }
  648.     /**
  649.      * @Route("/pool/{id}/graph/{parsingId}/type-tenure-commercial/{poolType}/data", name="public_pool_graph_type_tenure_commercial_data")
  650.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  651.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  652.      */
  653.     public function typeTenureCommercialData(Request $requestPoolProgram $poolHttParsing $parsingGraphTypeTenureCommercial $graphServicePoolProgramType $poolType)
  654.     {
  655.         $data $graphService
  656.             ->setPool($pool)
  657.             ->setPoolType($poolType)
  658.             ->setParsing($parsing)
  659.             ->getData();
  660.         return new JsonResponse($data);
  661.     }
  662.     /**
  663.      * @Route("/pool/{id}/graph/{parsingId}/geographic-breakdown/{poolType}", name="public_pool_graph_geographic_breakdown")
  664.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  665.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  666.      */
  667.     public function geographicBreakdown(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolTypeGraphGeographicBreakdownInternational $graphService)
  668.     {
  669.         $preview $request->get('preview') == 1;
  670.         $this->denyAccessUnlessGranted('view'$pool);
  671.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  672.         $httService->setParsing($parsing);
  673.         $mainCountry $graphService
  674.             ->setPool($pool)
  675.             ->setPoolType($poolType)
  676.             ->setParsing($parsing)
  677.             ->getMainCountry();
  678.         // list of other pools for the htt cutoffdate dropdown selector
  679.         $pools $this->em->getRepository(PoolProgram::class)
  680.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  681.         return $this->render('front/pool/graph/geographic-breakdown.html.twig', [
  682.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  683.             'httService' => $httService,
  684.             'parsing' => $parsing,
  685.             'pool' => $pool,
  686.             'poolType' => $poolType,
  687.             'issuer' => $pool->getIssuer(),
  688.             'preview' => $preview,
  689.             'mainCountry' => $mainCountry,
  690.             'pools' => $pools,
  691.         ]);
  692.     }
  693.     /**
  694.      * @Route("/pool/{id}/graph/{parsingId}/geographic-breakdown-international/{poolType}/data", name="public_pool_graph_geographic_breakdown_international_data")
  695.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  696.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  697.      */
  698.     public function geographicBreakdownInternationalData(Request $requestPoolProgram $poolHttParsing $parsingGraphGeographicBreakdownInternational $graphServicePoolProgramType $poolType)
  699.     {
  700.         $data $graphService
  701.             ->setPool($pool)
  702.             ->setPoolType($poolType)
  703.             ->setParsing($parsing)
  704.             ->getData();
  705.         return new JsonResponse($data);
  706.     }
  707.     /**
  708.      * @Route("/pool/{id}/graph/{parsingId}/geographic-breakdown-domestic/{poolType}/data", name="public_pool_graph_geographic_breakdown_domestic_data")
  709.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  710.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  711.      */
  712.     public function geographicBreakdownDomesticlData(Request $requestPoolProgram $poolHttParsing $parsingGraphGeographicBreakdownDomestic $graphServicePoolProgramType $poolType)
  713.     {
  714.         $data $graphService
  715.             ->setPool($pool)
  716.             ->setPoolType($poolType)
  717.             ->setParsing($parsing)
  718.             ->getData();
  719.         return new JsonResponse($data);
  720.     }
  721.     /**
  722.      * @Route("/pool/{id}/graph/{parsingId}/concentration-risks/{poolType}", name="public_pool_graph_concentration_risks")
  723.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  724.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  725.      */
  726.     public function concentrationRisks(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  727.     {
  728.         $preview $request->get('preview') == 1;
  729.         $this->denyAccessUnlessGranted('view'$pool);
  730.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  731.         $httService->setParsing($parsing);
  732.         // list of other pools for the htt cutoffdate dropdown selector
  733.         $pools $this->em->getRepository(PoolProgram::class)
  734.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  735.         return $this->render('front/pool/graph/concentration-risks.html.twig', [
  736.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  737.             'httService' => $httService,
  738.             'parsing' => $parsing,
  739.             'pool' => $pool,
  740.             'poolType' => $poolType,
  741.             'issuer' => $pool->getIssuer(),
  742.             'preview' => $preview,
  743.             'pools' => $pools,
  744.         ]);
  745.     }
  746.     /**
  747.      * @Route("/pool/{id}/graph/{parsingId}/concentration-risks/{poolType}/data", name="public_pool_graph_concentration_risks_data")
  748.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  749.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  750.      */
  751.     public function concentrationRisksData(Request $requestPoolProgram $poolHttParsing $parsingGraphConcentrationRisks $graphServicePoolProgramType $poolType)
  752.     {
  753.         $data $graphService
  754.             ->setPool($pool)
  755.             ->setPoolType($poolType)
  756.             ->setParsing($parsing)
  757.             ->getData();
  758.         return new JsonResponse($data);
  759.     }
  760.     /**
  761.      * @Route("/pool/{id}/graph/{parsingId}/concentration-risks-overtime/{poolType}/data", name="public_pool_graph_concentration_risks_overtime_data")
  762.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  763.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  764.      */
  765.     public function concentrationRisksOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphConcentrationRisksOvertime $graphServicePoolProgramType $poolType)
  766.     {
  767.         $data $graphService
  768.             ->setPool($pool)
  769.             ->setPoolType($poolType)
  770.             ->setParsing($parsing)
  771.             ->getData();
  772.         return new JsonResponse($data);
  773.     }
  774.     /**
  775.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-debtor/{poolType}", name="public_pool_graph_breakdown_by_type_of_debtor")
  776.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  777.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  778.      */
  779.     public function breakdownByTypeOfDeptor(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolTypeGraphBreakdownByTypeOfDebtor $graphService)
  780.     {
  781.         $preview $request->get('preview') == 1;
  782.         $this->denyAccessUnlessGranted('view'$pool);
  783.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  784.         $httService->setParsing($parsing);
  785.         // list of other pools for the htt cutoffdate dropdown selector
  786.         $pools $this->em->getRepository(PoolProgram::class)
  787.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  788.         $type $graphService
  789.             ->setPool($pool)
  790.             ->setPoolType($poolType)
  791.             ->getType();
  792.         return $this->render('front/pool/graph/breakdown-by-type-of-debtor.html.twig', [
  793.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  794.             'httService' => $httService,
  795.             'parsing' => $parsing,
  796.             'pool' => $pool,
  797.             'poolType' => $poolType,
  798.             'issuer' => $pool->getIssuer(),
  799.             'preview' => $preview,
  800.             'pools' => $pools,
  801.             'type' => $type
  802.         ]);
  803.     }
  804.     /**
  805.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-debtor/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_debtor_data")
  806.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  807.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  808.      */
  809.     public function breakdownByTypeOfDeptorData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByTypeOfDebtor $graphServicePoolProgramType $poolType)
  810.     {
  811.         $data $graphService
  812.             ->setPool($pool)
  813.             ->setPoolType($poolType)
  814.             ->setParsing($parsing)
  815.             ->getData();
  816.         return new JsonResponse($data);
  817.     }
  818.     /**
  819.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-debtor-overtime/{poolType}/{valueName}/data", name="public_pool_graph_breakdown_by_type_of_debtor_overtime_by_value_name_data")
  820.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  821.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  822.      */
  823.     public function breakdownByTypeOfDeptorOvertimeByValueNameData(Request $requestPoolProgram $poolHttParsing $parsingstring $valueNameGraphBreakdownByTypeOfDebtorOvertime $graphServicePoolProgramType $poolType)
  824.     {
  825.         $data $graphService
  826.             ->setPool($pool)
  827.             ->setValueName($valueName)
  828.             ->setPoolType($poolType)
  829.             ->setParsing($parsing)
  830.             ->getData();
  831.         return new JsonResponse($data);
  832.     }
  833.     /**
  834.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-debtor-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_debtor_overtime_data")
  835.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  836.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  837.      */
  838.     public function breakdownByTypeOfDeptorOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByTypeOfDebtorOvertime $graphServicePoolProgramType $poolType)
  839.     {
  840.         $data $graphService
  841.             ->setPool($pool)
  842.             ->setPoolType($poolType)
  843.             ->setParsing($parsing)
  844.             ->getData();
  845.         return new JsonResponse($data);
  846.     }
  847.     /**
  848.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-ship/{poolType}", name="public_pool_graph_breakdown_by_type_of_ship")
  849.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  850.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  851.      */
  852.     public function breakdownByTypeOfShip(Request $requestPoolProgram $poolHttParsing $parsingHttService $httServicePoolProgramType $poolType)
  853.     {
  854.         $preview $request->get('preview') == 1;
  855.         $this->denyAccessUnlessGranted('view'$pool);
  856.         $this->denyAccessUnlessGranted($preview 'validate' 'view'$parsing);
  857.         $httService->setParsing($parsing);
  858.         // list of other pools for the htt cutoffdate dropdown selector
  859.         $pools $this->em->getRepository(PoolProgram::class)
  860.             ->search(['active' => 1'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
  861.         return $this->render('front/pool/graph/breakdown-by-type-of-ship.html.twig', [
  862.             'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
  863.             'httService' => $httService,
  864.             'parsing' => $parsing,
  865.             'pool' => $pool,
  866.             'poolType' => $poolType,
  867.             'issuer' => $pool->getIssuer(),
  868.             'preview' => $preview,
  869.             'pools' => $pools,
  870.         ]);
  871.     }
  872.     /**
  873.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-ship/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_ship_data")
  874.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  875.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  876.      */
  877.     public function breakdownByTypeOfShipData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByTypeOfShip $graphServicePoolProgramType $poolType)
  878.     {
  879.         $data $graphService
  880.             ->setPool($pool)
  881.             ->setPoolType($poolType)
  882.             ->setParsing($parsing)
  883.             ->getData();
  884.         return new JsonResponse($data);
  885.     }
  886.     /**
  887.      * @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-ship-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_ship_overtime_data")
  888.      * @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
  889.      * @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
  890.      */
  891.     public function breakdownByTypeOfShipOvertimeData(Request $requestPoolProgram $poolHttParsing $parsingGraphBreakdownByTypeOfShipOvertime $graphServicePoolProgramType $poolType)
  892.     {
  893.         $data $graphService
  894.             ->setPool($pool)
  895.             ->setPoolType($poolType)
  896.             ->setParsing($parsing)
  897.             ->getData();
  898.         return new JsonResponse($data);
  899.     }
  900. }