Your IP : 216.73.217.79


Current Path : /var/www/v3.cesa.co.za/src/MemberBundle/Controller/
Upload File :
Current File : /var/www/v3.cesa.co.za/src/MemberBundle/Controller/TransformationController.php

<?php

namespace App\MemberBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\ExpressionLanguage\Expression;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use App\CoreBundle\Services\ServiceGetterManager;

class TransformationController extends AbstractController {

    #[Route('/transformation/graphs.html', name: 'member_transformation_home')]
    #[IsGranted(new Expression('is_granted("ROLE_ADMIN") or is_granted("ROLE_FORM_ADMIN")'))]
    public function index(Request $request, ServiceGetterManager $sg): Response {

        $transformationStatistics = $sg->get('member_firm.manager')->getTransformationStatistics();

        return $this->render('@MemberBundle/Default/index.html.twig', ['transformationStatistics' => $transformationStatistics]);
    }
}