Last active
March 7, 2019 10:52
-
-
Save ger86/dbf3243456974638181d7c020046b984 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\HttpFoundation\Response; | |
use App\Repository\StripePlanRepository; | |
class ChooseSubscriptionController extends AbstractController { | |
/** | |
* Creates a form to choose subscription | |
* | |
* @param StripePlanRepository $stripePlanRepository | |
* @param string $stripePublicApiKey | |
* @return Response | |
*/ | |
public function __invoke( | |
StripePlanRepository $stripePlanRepo, | |
string $stripePublicApiKey | |
): Response { | |
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY'); | |
$stripePlans = $stripePlanRepo->findAll(); | |
return $this->render('views/stripe_choose_subscription.html.twig', [ | |
'stripePlans' => $stripePlans, | |
'stripePublicApiKey' => $stripePublicApiKey | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment