<?php
// src/Controller/PoolGraphController.php
namespace App\Controller\Front;
use App\Controller\CustomController;
use App\Entity\HttParsing;
use App\Entity\PoolProgram;
use App\Entity\PoolProgramType;
use App\Service\CurrencyService;
use App\Service\HttGraph\GraphAmortisation;
use App\Service\HttGraph\GraphAmortisationOvertime;
use App\Service\HttGraph\GraphBreakdownByInterestRate;
use App\Service\HttGraph\GraphBreakdownByInterestRateOvertime;
use App\Service\HttGraph\GraphBreakdownByRepaymentType;
use App\Service\HttGraph\GraphBreakdownByRepaymentTypeOvertime;
use App\Service\HttGraph\GraphBreakdownByTypeOfDebtor;
use App\Service\HttGraph\GraphBreakdownByTypeOfDebtorOvertime;
use App\Service\HttGraph\GraphBreakdownByTypeOfShip;
use App\Service\HttGraph\GraphBreakdownByTypeOfShipOvertime;
use App\Service\HttGraph\GraphConcentrationRisks;
use App\Service\HttGraph\GraphConcentrationRisksOvertime;
use App\Service\HttGraph\GraphCurrencyBreakdownCoverAssets;
use App\Service\HttGraph\GraphCurrencyBreakdownCoverAssetsOvertime;
use App\Service\HttGraph\GraphCurrencyBreakdownCoveredBonds;
use App\Service\HttGraph\GraphCurrencyBreakdownCoveredBondsOvertime;
use App\Service\HttGraph\GraphGeographicBreakdownDomestic;
use App\Service\HttGraph\GraphGeographicBreakdownInternational;
use App\Service\HttGraph\GraphInterestRateBreakdown;
use App\Service\HttGraph\GraphInterestRateBreakdownOvertime;
use App\Service\HttGraph\GraphLoanSeasoningBar;
use App\Service\HttGraph\GraphLoanSeasoningOvertime;
use App\Service\HttGraph\GraphLoanSizeInformationCommercial;
use App\Service\HttGraph\GraphLoanSizeInformationResidential;
use App\Service\HttGraph\GraphLtvDistributionIndexed;
use App\Service\HttGraph\GraphLtvDistributionIndexedOvertime;
use App\Service\HttGraph\GraphLtvDistributionUnindexed;
use App\Service\HttGraph\GraphLtvDistributionUnindexedOvertime;
use App\Service\HttGraph\GraphOvercollateralisation;
use App\Service\HttGraph\GraphOvercollateralisationOvertime;
use App\Service\HttGraph\GraphOvercollateralisationOvertimeOc;
use App\Service\HttGraph\GraphTypeTenureCommercial;
use App\Service\HttGraph\GraphTypeTenureResidential;
use App\Service\HttGraph\GraphTypeTenureResidentialOvertime;
use App\Service\HttParser\Table\TableCurrencyBreakdownCoverAssets;
use App\Service\HttParser\Table\TableCurrencyBreakdownCoverBonds;
use App\Service\HttParser\Table\TableLoanSeasoningBar;
use App\Service\HttService;
use App\Service\PoolService;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class PoolGraphController extends CustomController
{
protected CurrencyService $currencyService;
protected PoolService $poolService;
public function __construct(
EntityManagerInterface $em,
RequestStack $requestStack,
CurrencyService $currencyService,
PoolService $poolService
)
{
parent::__construct($em, $requestStack);
$this->currencyService = $currencyService;
$this->poolService = $poolService;
}
/**
* @Route("/pool/{id}/graph/{parsingId}/overcollateralisation", name="public_pool_graph_overcollateralisation")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function overcollateralisation(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/overcollateralisation.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/overcollateralisation/data", name="public_pool_graph_overcollateralisation_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphOvercollateralisationData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphOvercollateralisation $graphService)
{
$data = $graphService
->setPool($pool)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/overcollateralisation-overtime/data", name="public_pool_graph_overcollateralisation_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphOvercollateralisationOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphOvercollateralisationOvertime $graphService)
{
$data = $graphService
->setPool($pool)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/overcollateralisation-overtime-oc/data", name="public_pool_graph_overcollateralisation_overtime_oc_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphOvercollateralisationOvertimeOcData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphOvercollateralisationOvertimeOc $graphService)
{
$data = $graphService
->setPool($pool)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/amortisation", name="public_pool_graph_amortisation")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function amortisation(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/amortisation.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/amortisation/data", name="public_pool_graph_amortisation_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphAmortisationData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphAmortisation $graphService)
{
$data = $graphService
->setPool($pool)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/amortisation-overtime/data/{valueName}", name="public_pool_graph_amortisation_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphAmortisationOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, $valueName, GraphAmortisationOvertime $graphService)
{
$data = $graphService
->setValueName($valueName)
->setPool($pool)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/currency-breakdown", name="public_pool_graph_currency_breakdown")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function currencyBreakdown(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
// get currencies
$currenciesCoverAssets = array_keys($httService->getSerializedValue(TableCurrencyBreakdownCoverAssets::TABLE_NAME, TableCurrencyBreakdownCoverAssets::VALUE_NAME_HEDGING));
$currenciesCoverBonds = array_keys($httService->getSerializedValue(TableCurrencyBreakdownCoverBonds::TABLE_NAME, TableCurrencyBreakdownCoverBonds::VALUE_NAME_HEDGING));
return $this->render('front/pool/graph/currency-breakdown.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
'currenciesCoverAssets' => $currenciesCoverAssets,
'currenciesCoverBonds' => $currenciesCoverBonds,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-cover-assets/data", name="public_pool_graph_currency_breakdown_cover_assets_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphCurrencyBreakdownCoverAssetsData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphCurrencyBreakdownCoverAssets $graphService)
{
$data = $graphService
->setPool($pool)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-cover-assets-overtime/data/{valueName}", name="public_pool_graph_currency_breakdown_cover_assets_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphCurrencyBreakdownCoverAssetsOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, $valueName, GraphCurrencyBreakdownCoverAssetsOvertime $graphService)
{
$data = $graphService
->setValueName($valueName)
->setPool($pool)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-covered-bonds/data", name="public_pool_graph_currency_breakdown_covered_bonds_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphCurrencyBreakdownCoveredBondsData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphCurrencyBreakdownCoveredBonds $graphService)
{
$data = $graphService
->setPool($pool)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/currency-breakdown-covered-bonds-overtime/data/{valueName}", name="public_pool_graph_currency_breakdown_covered_bonds_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function graphCurrencyBreakdownCoveredBondsOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, $valueName, GraphCurrencyBreakdownCoveredBondsOvertime $graphService)
{
$data = $graphService
->setValueName($valueName)
->setPool($pool)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/interest-rate-breakdown", name="public_pool_graph_interest_rate_breakdown")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function interestRateBreakdown(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/interest-rate-breakdown.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/interest-rate-breakdown/data", name="public_pool_graph_interest_rate_breakdown_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function interestRateBreakdownData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphInterestRateBreakdown $graphService)
{
$data = $graphService
->setPool($pool)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/interest-rate-breakdown-overtime/data/{valueName}", name="public_pool_graph_interest_rate_breakdown_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
*/
public function interestRateBreakdownOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, $valueName, GraphInterestRateBreakdownOvertime $graphService)
{
$data = $graphService
->setValueName($valueName)
->setPool($pool)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-interest-rate/{poolType}", name="public_pool_graph_breakdown_by_interest_rate")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByInterestRate(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/breakdown-by-interest-rate.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-interest-rate/{poolType}/data", name="public_pool_graph_breakdown_by_interest_rate_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByInterestRateData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByInterestRate $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-interest-rate-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_interest_rate_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByInterestRateOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByInterestRateOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-repayment-type/{poolType}", name="public_pool_graph_breakdown_by_repayment_type")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByRepaymentType(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/breakdown-by-repayment-type.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-repayment-type/{poolType}/data", name="public_pool_graph_breakdown_by_repayment_type_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByRepaymentTypeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByRepaymentType $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-repayment-type-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_repayment_type_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByRepaymentTypeOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByRepaymentTypeOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-seasoning/{poolType}", name="public_pool_graph_loan_seasoning")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSeasoning(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/loan-seasoning.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-seasoning/{poolType}/data", name="public_pool_graph_loan_seasoning_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSeasoningData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLoanSeasoningBar $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-seasoning-overtime-total/{poolType}/data", name="public_pool_graph_loan_seasoning_overtime_total_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSeasoningOvertimeTotalData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLoanSeasoningOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-size-information/{poolType}", name="public_pool_graph_loan_size_information")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSizeInformation(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/loan-size-information.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-size-information-residential/{poolType}/data", name="public_pool_graph_loan_size_information_residential_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSizeInformationResidentialData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLoanSizeInformationResidential $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-size-information-commercial/{poolType}/data", name="public_pool_graph_loan_size_information_commercial_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSizeInformationCommercialData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLoanSizeInformationCommercial $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/ltv/{poolType}", name="public_pool_graph_ltv")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function ltv(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/ltv.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-indexed/{poolType}/data", name="public_pool_graph_ltv_indexed_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSizeLtvIndexedData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLtvDistributionIndexed $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-indexed-overtime/{poolType}/data", name="public_pool_graph_ltv_indexed_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSizeLtvIndexedOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLtvDistributionIndexedOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-unindexed/{poolType}/data", name="public_pool_graph_ltv_unindexed_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSizeLtvUnIndexedData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLtvDistributionUnindexed $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/loan-size-ltv-unindexed-overtime/{poolType}/data", name="public_pool_graph_ltv_unindexed_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function loanSizeLtvUnIndexedOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphLtvDistributionUnindexedOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/type-tenure/{poolType}", name="public_pool_graph_type_tenure")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function typeTenure(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/type-tenure.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/type-tenure-residential/{poolType}/data", name="public_pool_graph_type_tenure_residential_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function typeTenureResidentialData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphTypeTenureResidential $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/type-tenure-residential-overtime/{poolType}/data", name="public_pool_graph_type_tenure_residential_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function typeTenureResidentialOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphTypeTenureResidentialOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData($request->get('preview') == 1);
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/type-tenure-commercial/{poolType}/data", name="public_pool_graph_type_tenure_commercial_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function typeTenureCommercialData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphTypeTenureCommercial $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/geographic-breakdown/{poolType}", name="public_pool_graph_geographic_breakdown")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function geographicBreakdown(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType, GraphGeographicBreakdownInternational $graphService)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
$mainCountry = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getMainCountry();
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/geographic-breakdown.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'mainCountry' => $mainCountry,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/geographic-breakdown-international/{poolType}/data", name="public_pool_graph_geographic_breakdown_international_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function geographicBreakdownInternationalData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphGeographicBreakdownInternational $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/geographic-breakdown-domestic/{poolType}/data", name="public_pool_graph_geographic_breakdown_domestic_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function geographicBreakdownDomesticlData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphGeographicBreakdownDomestic $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/concentration-risks/{poolType}", name="public_pool_graph_concentration_risks")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function concentrationRisks(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/concentration-risks.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/concentration-risks/{poolType}/data", name="public_pool_graph_concentration_risks_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function concentrationRisksData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphConcentrationRisks $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/concentration-risks-overtime/{poolType}/data", name="public_pool_graph_concentration_risks_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function concentrationRisksOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphConcentrationRisksOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-debtor/{poolType}", name="public_pool_graph_breakdown_by_type_of_debtor")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByTypeOfDeptor(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType, GraphBreakdownByTypeOfDebtor $graphService)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
$type = $graphService
->setPool($pool)
->setPoolType($poolType)
->getType();
return $this->render('front/pool/graph/breakdown-by-type-of-debtor.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
'type' => $type
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-debtor/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_debtor_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByTypeOfDeptorData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByTypeOfDebtor $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @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")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByTypeOfDeptorOvertimeByValueNameData(Request $request, PoolProgram $pool, HttParsing $parsing, string $valueName, GraphBreakdownByTypeOfDebtorOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setValueName($valueName)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-debtor-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_debtor_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByTypeOfDeptorOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByTypeOfDebtorOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-ship/{poolType}", name="public_pool_graph_breakdown_by_type_of_ship")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByTypeOfShip(Request $request, PoolProgram $pool, HttParsing $parsing, HttService $httService, PoolProgramType $poolType)
{
$preview = $request->get('preview') == 1;
$this->denyAccessUnlessGranted('view', $pool);
$this->denyAccessUnlessGranted($preview ? 'validate' : 'view', $parsing);
$httService->setParsing($parsing);
// list of other pools for the htt cutoffdate dropdown selector
$pools = $this->em->getRepository(PoolProgram::class)
->search(['active' => 1, 'issuer' => $pool->getIssuer()], ['p.identifier'=>'asc']);
return $this->render('front/pool/graph/breakdown-by-type-of-ship.html.twig', [
'showCustomTerms' => $this->poolService->setPool($pool)->mustShowCustomTerms(),
'httService' => $httService,
'parsing' => $parsing,
'pool' => $pool,
'poolType' => $poolType,
'issuer' => $pool->getIssuer(),
'preview' => $preview,
'pools' => $pools,
]);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-ship/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_ship_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByTypeOfShipData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByTypeOfShip $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
/**
* @Route("/pool/{id}/graph/{parsingId}/breakdown-by-type-of-ship-overtime/{poolType}/data", name="public_pool_graph_breakdown_by_type_of_ship_overtime_data")
* @ParamConverter("parsing", options={"mapping": {"parsingId": "id"}})
* @ParamConverter("poolType", options={"mapping": {"poolType": "name"}})
*/
public function breakdownByTypeOfShipOvertimeData(Request $request, PoolProgram $pool, HttParsing $parsing, GraphBreakdownByTypeOfShipOvertime $graphService, PoolProgramType $poolType)
{
$data = $graphService
->setPool($pool)
->setPoolType($poolType)
->setParsing($parsing)
->getData();
return new JsonResponse($data);
}
}