src/Bidcoz/Bundle/CoreBundle/BidcozCoreServices.php line 533

Open in your IDE?
  1. <?php
  2. namespace Bidcoz\Bundle\CoreBundle;
  3. use Bidcoz\Bundle\CoreBundle\Entity\Campaign;
  4. use Bidcoz\Bundle\CoreBundle\Entity\User;
  5. use Bidcoz\Bundle\CoreBundle\Factory\TransactionFactory;
  6. use Bidcoz\Bundle\CoreBundle\Form\DataTransformer\EntityTransformerFactory;
  7. use Bidcoz\Bundle\CoreBundle\Services\ActiveCampaignManager;
  8. use Bidcoz\Bundle\CoreBundle\Services\AuctionManager;
  9. use Bidcoz\Bundle\CoreBundle\Services\AuctionPermissionManager;
  10. use Bidcoz\Bundle\CoreBundle\Services\BidManager;
  11. use Bidcoz\Bundle\CoreBundle\Services\BidNumberManager;
  12. use Bidcoz\Bundle\CoreBundle\Services\CampaignManager;
  13. use Bidcoz\Bundle\CoreBundle\Services\CampaignStatsManager;
  14. use Bidcoz\Bundle\CoreBundle\Services\CompanyImportManager;
  15. use Bidcoz\Bundle\CoreBundle\Services\CompanyManager;
  16. use Bidcoz\Bundle\CoreBundle\Services\ContactImportManager;
  17. use Bidcoz\Bundle\CoreBundle\Services\ContactManager;
  18. use Bidcoz\Bundle\CoreBundle\Services\CreditCardManager;
  19. use Bidcoz\Bundle\CoreBundle\Services\CustomMessagesManager;
  20. use Bidcoz\Bundle\CoreBundle\Services\DisplayFeedManager;
  21. use Bidcoz\Bundle\CoreBundle\Services\DonationManager;
  22. use Bidcoz\Bundle\CoreBundle\Services\EmailManager;
  23. use Bidcoz\Bundle\CoreBundle\Services\ErrorMessageManager;
  24. use Bidcoz\Bundle\CoreBundle\Services\FinancialCalculator;
  25. use Bidcoz\Bundle\CoreBundle\Services\FreshdeskManager;
  26. use Bidcoz\Bundle\CoreBundle\Services\ItemCategoryManager;
  27. use Bidcoz\Bundle\CoreBundle\Services\ItemImportManager;
  28. use Bidcoz\Bundle\CoreBundle\Services\ItemManager;
  29. use Bidcoz\Bundle\CoreBundle\Services\JobManager;
  30. use Bidcoz\Bundle\CoreBundle\Services\KindfulJobManager;
  31. use Bidcoz\Bundle\CoreBundle\Services\LinkManager;
  32. use Bidcoz\Bundle\CoreBundle\Services\LoggedInUserProvider;
  33. use Bidcoz\Bundle\CoreBundle\Services\LoginLinkManager;
  34. use Bidcoz\Bundle\CoreBundle\Services\LogManager;
  35. use Bidcoz\Bundle\CoreBundle\Services\MandrillManager;
  36. use Bidcoz\Bundle\CoreBundle\Services\MediaManager;
  37. use Bidcoz\Bundle\CoreBundle\Services\MessageManager;
  38. use Bidcoz\Bundle\CoreBundle\Services\NotificationManager;
  39. use Bidcoz\Bundle\CoreBundle\Services\OrganizationManager;
  40. use Bidcoz\Bundle\CoreBundle\Services\OrganizationStatsManager;
  41. use Bidcoz\Bundle\CoreBundle\Services\PaymentGatewayManager;
  42. use Bidcoz\Bundle\CoreBundle\Services\PayPalManager;
  43. use Bidcoz\Bundle\CoreBundle\Services\PdfManager;
  44. use Bidcoz\Bundle\CoreBundle\Services\PermissionManager;
  45. use Bidcoz\Bundle\CoreBundle\Services\PurchaseManager;
  46. use Bidcoz\Bundle\CoreBundle\Services\QuestionManager;
  47. use Bidcoz\Bundle\CoreBundle\Services\RaffleManager;
  48. use Bidcoz\Bundle\CoreBundle\Services\RegistrationManager;
  49. use Bidcoz\Bundle\CoreBundle\Services\ReportManager;
  50. use Bidcoz\Bundle\CoreBundle\Services\ReservedSeatUploadManager;
  51. use Bidcoz\Bundle\CoreBundle\Services\SMSManager;
  52. use Bidcoz\Bundle\CoreBundle\Services\SponsorshipManager;
  53. use Bidcoz\Bundle\CoreBundle\Services\StripeManager;
  54. use Bidcoz\Bundle\CoreBundle\Services\TagManager;
  55. use Bidcoz\Bundle\CoreBundle\Services\TicketManager;
  56. use Bidcoz\Bundle\CoreBundle\Services\TicketPermissionManager;
  57. use Bidcoz\Bundle\CoreBundle\Services\TicketUploadManager;
  58. use Bidcoz\Bundle\CoreBundle\Services\TransactionManager;
  59. use Bidcoz\Bundle\CoreBundle\Services\UserManager as BidcozUserManager;
  60. use Bidcoz\Bundle\CoreBundle\Services\VolunteerManager;
  61. use Bidcoz\Bundle\CoreBundle\Services\WatchListManager;
  62. use Bidcoz\Bundle\CoreBundle\SMS\Conversation\ConversationFactory;
  63. use Bidcoz\Bundle\CoreBundle\SMS\SMSSenderFactory;
  64. use Bidcoz\Bundle\FrontendBundle\Twig\Extension\TicketExtension;
  65. use Bidcoz\Bundle\KindfulBundle\Service\ContactsService;
  66. use Bidcoz\Bundle\KindfulBundle\Service\KindfulService;
  67. use Bidcoz\Bundle\UserBundle\PhoneNumberAssociationManager;
  68. use Doctrine\ORM\EntityManagerInterface;
  69. use Faker\Factory;
  70. use Faker\Generator;
  71. use FOS\UserBundle\Form\Factory\FactoryInterface;
  72. use FOS\UserBundle\Model\UserManagerInterface;
  73. use GuzzleHttp\Client;
  74. use JMS\Serializer\SerializerInterface;
  75. use Knp\Component\Pager\PaginatorInterface;
  76. use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
  77. use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface;
  78. use Psr\Log\LoggerInterface;
  79. use RS\DiExtraBundle\Annotation as DI;
  80. use Stripe\Stripe;
  81. use Symfony\Component\DependencyInjection\ContainerInterface;
  82. use Symfony\Component\EventDispatcher\EventDispatcherInterface;
  83. use Symfony\Component\Form\FormFactoryInterface;
  84. use Symfony\Component\HttpFoundation\RequestStack;
  85. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  86. use Symfony\Component\Routing\RouterInterface;
  87. use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
  88. use Symfony\Component\Validator\Validator\ValidatorInterface;
  89. trait BidcozCoreServices
  90. {
  91.     protected ContainerInterface $locator;
  92.     /**
  93.      * @DI\InjectParams({
  94.      *     "locator" = @DI\Inject("service_container"),
  95.      * })
  96.      */
  97.     public function __construct(ContainerInterface $locator)
  98.     {
  99.         $this->locator $locator;
  100.     }
  101.     public static function getSubscribedServices(): array
  102.     {
  103.         $services = [
  104.             'active_campaign_manager' => ActiveCampaignManager::class,
  105.             'auction_manager' => AuctionManager::class,
  106.             'auction_permission_manager' => AuctionPermissionManager::class,
  107.             'bid_manager' => BidManager::class,
  108.             'bidcoz.form.entity_transformer_factory' => EntityTransformerFactory::class,
  109.             ContactsService::class => ContactsService::class,
  110.             KindfulService::class => KindfulService::class,
  111.             TicketExtension::class => TicketExtension::class,
  112.             'bidnumber_manager' => BidNumberManager::class,
  113.             'campaign_manager' => CampaignManager::class,
  114.             'campaign_stats_manager' => CampaignStatsManager::class,
  115.             'company_import_manager' => CompanyImportManager::class,
  116.             'company_manager' => CompanyManager::class,
  117.             'contact_import_manager' => ContactImportManager::class,
  118.             'contact_manager' => ContactManager::class,
  119.             'conversation_factory' => ConversationFactory::class,
  120.             'credit_card_manager' => CreditCardManager::class,
  121.             'custom_messages_manager' => CustomMessagesManager::class,
  122.             'display_feed_manager' => DisplayFeedManager::class,
  123.             'doctrine.orm.default_entity_manager' => EntityManagerInterface::class,
  124.             'donation_manager' => DonationManager::class,
  125.             'email_manager' => EmailManager::class,
  126.             'error_message_manager' => ErrorMessageManager::class,
  127.             'event_dispatcher' => EventDispatcherInterface::class,
  128.             'financial_calculator' => FinancialCalculator::class,
  129.             'form.factory' => FormFactoryInterface::class,
  130.             'fos_user.user_manager' => UserManagerInterface::class,
  131.             'freshdesk_manager' => FreshdeskManager::class,
  132.             'item_category_manager' => ItemCategoryManager::class,
  133.             'item_import_manager' => ItemImportManager::class,
  134.             'item_manager' => ItemManager::class,
  135.             'jms_serializer' => SerializerInterface::class,
  136.             'job_manager' => JobManager::class,
  137.             'kindful_job_manager' => KindfulJobManager::class,
  138.             'knp_paginator' => PaginatorInterface::class,
  139.             'knpu.oauth2.registry' => ClientRegistry::class,
  140.             'lexik_form_filter.query_builder_updater' => FilterBuilderUpdaterInterface::class,
  141.             'link_manager' => LinkManager::class,
  142.             'log_manager' => LogManager::class,
  143.             'logger' => LoggerInterface::class,
  144.             'login_link_manager' => LoginLinkManager::class,
  145.             'mandrill_manager' => MandrillManager::class,
  146.             'media_manager' => MediaManager::class,
  147.             'message_manager' => MessageManager::class,
  148.             'monolog.logger.paypal' => LoggerInterface::class,
  149.             'notification_manager' => NotificationManager::class,
  150.             'organization_manager' => OrganizationManager::class,
  151.             'organization_stats_manager' => OrganizationStatsManager::class,
  152.             'payment_gateway_manager' => PaymentGatewayManager::class,
  153.             'paypal_manager' => PayPalManager::class,
  154.             'pdf_manager' => PdfManager::class,
  155.             'permission_manager' => PermissionManager::class,
  156.             'phone_number_association_manager' => PhoneNumberAssociationManager::class,
  157.             'purchase_manager' => PurchaseManager::class,
  158.             'question_manager' => QuestionManager::class,
  159.             'raffle_manager' => RaffleManager::class,
  160.             'registration_manager' => RegistrationManager::class,
  161.             'report_manager' => ReportManager::class,
  162.             'request_stack' => RequestStack::class,
  163.             'reserved_seat_upload_manager' => ReservedSeatUploadManager::class,
  164.             'router' => RouterInterface::class,
  165.             'sms_manager' => SMSManager::class,
  166.             'sms_sender_factory' => SMSSenderFactory::class,
  167.             'security.authorization_checker' => AuthorizationCheckerInterface::class,
  168.             'sponsorship_manager' => SponsorshipManager::class,
  169.             'stripe_manager' => StripeManager::class,
  170.             'tag_manager' => TagManager::class,
  171.             'ticket_manager' => TicketManager::class,
  172.             'ticket_permission_manager' => TicketPermissionManager::class,
  173.             'ticket_upload_manager' => TicketUploadManager::class,
  174.             'transaction_factory' => TransactionFactory::class,
  175.             'transaction_manager' => TransactionManager::class,
  176.             'user_manager' => BidcozUserManager::class,
  177.             'user_provider' => LoggedInUserProvider::class,
  178.             'validator' => ValidatorInterface::class,
  179.             'volunteer_manager' => VolunteerManager::class,
  180.             'watchlist_manager' => WatchListManager::class,
  181.         ];
  182.         if (method_exists(parent::class, 'getSubscribedServices')) {
  183.             return array_merge(parent::getSubscribedServices(), $services);
  184.         }
  185.         return $services;
  186.     }
  187.     protected function get($service): object
  188.     {
  189.         return $this->locator->get($service);
  190.     }
  191.     protected function getEntityManager(): EntityManagerInterface
  192.     {
  193.         return $this->locator->get('doctrine.orm.default_entity_manager');
  194.     }
  195.     protected function getRepository($class$fullPath false)
  196.     {
  197.         $className $fullPath
  198.             $class
  199.             sprintf('\\Bidcoz\\Bundle\\CoreBundle\\Entity\\%s'$class);
  200.         return $this->getEntityManager()->getRepository($className);
  201.     }
  202.     protected function getEntityReference($class$id$fullPath false)
  203.     {
  204.         $className $fullPath
  205.             $class
  206.             sprintf('\\Bidcoz\\Bundle\\CoreBundle\\Entity\\%s'$class);
  207.         return $this->getEntityManager()->getReference($className$id);
  208.     }
  209.     protected function getUserManager(): UserManagerInterface
  210.     {
  211.         return $this->get('fos_user.user_manager');
  212.     }
  213.     protected function getBidcozUserManager(): BidcozUserManager
  214.     {
  215.         return $this->get('user_manager');
  216.     }
  217.     protected function getRaffleManager(): RaffleManager
  218.     {
  219.         return $this->get('raffle_manager');
  220.     }
  221.     protected function getEventDispatcher(): EventDispatcherInterface
  222.     {
  223.         return $this->get('event_dispatcher');
  224.     }
  225.     protected function getOrganizationManager(): OrganizationManager
  226.     {
  227.         return $this->get('organization_manager');
  228.     }
  229.     protected function getCampaignManager(): CampaignManager
  230.     {
  231.         return $this->get('campaign_manager');
  232.     }
  233.     protected function getCampaignStatsManager(): CampaignStatsManager
  234.     {
  235.         return $this->get('campaign_stats_manager');
  236.     }
  237.     protected function getOrganizationStatsManager(): OrganizationStatsManager
  238.     {
  239.         return $this->get('organization_stats_manager');
  240.     }
  241.     protected function getJobManager(): JobManager
  242.     {
  243.         return $this->get('job_manager');
  244.     }
  245.     protected function getTransactionManager(): TransactionManager
  246.     {
  247.         return $this->get('transaction_manager');
  248.     }
  249.     protected function getVolunteerManager(): VolunteerManager
  250.     {
  251.         return $this->get('volunteer_manager');
  252.     }
  253.     protected function getTransactionFactory(): TransactionFactory
  254.     {
  255.         return $this->get('transaction_factory');
  256.     }
  257.     protected function getTicketManager(): TicketManager
  258.     {
  259.         return $this->get('ticket_manager');
  260.     }
  261.     protected function getTicketUploadManager(): TicketUploadManager
  262.     {
  263.         return $this->get('ticket_upload_manager');
  264.     }
  265.     protected function getReservedSeatsUploadManager(Campaign $campaign): ReservedSeatUploadManager
  266.     {
  267.         $manager $this->get('reserved_seat_upload_manager');
  268.         $manager->setCampaign($campaign);
  269.         return $manager;
  270.     }
  271.     protected function getRegistrationManager(): RegistrationManager
  272.     {
  273.         return $this->get('registration_manager');
  274.     }
  275.     protected function getTagManager(): TagManager
  276.     {
  277.         return $this->get('tag_manager');
  278.     }
  279.     protected function getContactManager(): ContactManager
  280.     {
  281.         return $this->get('contact_manager');
  282.     }
  283.     protected function getContactImportManager(): ContactImportManager
  284.     {
  285.         return $this->get('contact_import_manager');
  286.     }
  287.     protected function getPurchaseManager(): PurchaseManager
  288.     {
  289.         return $this->get('purchase_manager');
  290.     }
  291.     protected function getDonationManager(): DonationManager
  292.     {
  293.         return $this->get('donation_manager');
  294.     }
  295.     protected function getCcManager(): CreditCardManager
  296.     {
  297.         return $this->get('credit_card_manager');
  298.     }
  299.     protected function getMediaManager(): MediaManager
  300.     {
  301.         return $this->get('media_manager');
  302.     }
  303.     protected function getAuctionManager(): AuctionManager
  304.     {
  305.         return $this->get('auction_manager');
  306.     }
  307.     protected function getBidManager(): BidManager
  308.     {
  309.         return $this->get('bid_manager');
  310.     }
  311.     protected function getPaymentGatewayManager(): PaymentGatewayManager
  312.     {
  313.         return $this->get('payment_gateway_manager');
  314.     }
  315.     protected function getBidNumberManager(): BidNumberManager
  316.     {
  317.         return $this->get('bidnumber_manager');
  318.     }
  319.     protected function getItemManager(): ItemManager
  320.     {
  321.         return $this->get('item_manager');
  322.     }
  323.     protected function getItemCategoryManager(): ItemCategoryManager
  324.     {
  325.         return $this->get('item_category_manager');
  326.     }
  327.     protected function getItemImportManager(): ItemImportManager
  328.     {
  329.         return $this->get('item_import_manager');
  330.     }
  331.     protected function getWatchListManager(): WatchListManager
  332.     {
  333.         return $this->get('watchlist_manager');
  334.     }
  335.     protected function getSponsorshipManager(): SponsorshipManager
  336.     {
  337.         return $this->get('sponsorship_manager');
  338.     }
  339.     protected function getPermissionManager(): PermissionManager
  340.     {
  341.         return $this->get('permission_manager');
  342.     }
  343.     protected function getAuctionPermissionManager(): AuctionPermissionManager
  344.     {
  345.         return $this->get('auction_permission_manager');
  346.     }
  347.     protected function getTicketPermissionManager(): TicketPermissionManager
  348.     {
  349.         return $this->get('ticket_permission_manager');
  350.     }
  351.     protected function getReportManager(): ReportManager
  352.     {
  353.         return $this->get('report_manager');
  354.     }
  355.     protected function getQuestionManager(): QuestionManager
  356.     {
  357.         return $this->get('question_manager');
  358.     }
  359.     protected function getPaginator(): PaginatorInterface
  360.     {
  361.         return $this->get('knp_paginator');
  362.     }
  363.     protected function getQueryBuilderFilter(): FilterBuilderUpdaterInterface
  364.     {
  365.         return $this->get('lexik_form_filter.query_builder_updater');
  366.     }
  367.     protected function getSerializer(): SerializerInterface
  368.     {
  369.         return $this->get('jms_serializer');
  370.     }
  371.     protected function getSession(): SessionInterface
  372.     {
  373.         return $this->getRequestStack()->getSession();
  374.     }
  375.     protected function getRouter(): RouterInterface
  376.     {
  377.         return $this->get('router');
  378.     }
  379.     protected function getLogger(): LoggerInterface
  380.     {
  381.         return $this->get('logger');
  382.     }
  383.     protected function getPaypalLogger(): LoggerInterface
  384.     {
  385.         return $this->get('monolog.logger.paypal');
  386.     }
  387.     protected function getValidator(): ValidatorInterface
  388.     {
  389.         return $this->get('validator');
  390.     }
  391.     protected function getPayPalManager(): PayPalManager
  392.     {
  393.         return $this->get('paypal_manager');
  394.     }
  395.     protected function getCompanyManager(): CompanyManager
  396.     {
  397.         return $this->get('company_manager');
  398.     }
  399.     protected function getCompanyImportManager(): CompanyImportManager
  400.     {
  401.         return $this->get('company_import_manager');
  402.     }
  403.     protected function getTransformerFactory(): EntityTransformerFactory
  404.     {
  405.         return $this->get('bidcoz.form.entity_transformer_factory');
  406.     }
  407.     protected function getEmailManager(): EmailManager
  408.     {
  409.         return $this->get('email_manager');
  410.     }
  411.     protected function getSMSManager(): SMSManager
  412.     {
  413.         return $this->get('sms_manager');
  414.     }
  415.     protected function getSMSSenderFactory(): SMSSenderFactory
  416.     {
  417.         return $this->get('sms_sender_factory');
  418.     }
  419.     protected function getFinancialCalculator(): FinancialCalculator
  420.     {
  421.         return $this->get('financial_calculator');
  422.     }
  423.     protected function getFormFactory(): FormFactoryInterface
  424.     {
  425.         return $this->get('form.factory');
  426.     }
  427.     protected function getLinkManager(): LinkManager
  428.     {
  429.         return $this->get('link_manager');
  430.     }
  431.     protected function getLoggedInUserProvider(): LoggedInUserProvider
  432.     {
  433.         return $this->get('user_provider');
  434.     }
  435.     protected function getLoggedInUser()
  436.     {
  437.         return $this->getLoggedInUserProvider()->getLoggedInUser();
  438.     }
  439.     protected function getUserTimezone(Campaign $campaign null)
  440.     {
  441.         $user $this->getLoggedInUser();
  442.         if ($user) {
  443.             return $user->getTimezone();
  444.         } else {
  445.             return $campaign
  446.                 $campaign->getTimezone()
  447.                 : 'America/Chicago';
  448.         }
  449.     }
  450.     protected function getEntityTransformer($class$fullPath false)
  451.     {
  452.         $className $fullPath
  453.             $class
  454.             sprintf('Bidcoz\Bundle\CoreBundle\Entity\%s'$class);
  455.         return $this->getTransformerFactory()->create($className);
  456.     }
  457.     protected function getActiveConfiguration()
  458.     {
  459.         return $this->getRepository('Config')->findActiveConfig();
  460.     }
  461.     protected function getFaker($seed null): Generator
  462.     {
  463.         $faker Factory::create();
  464.         if ($seed) {
  465.             $faker->seed($seed);
  466.         }
  467.         return $faker;
  468.     }
  469.     protected function getGuzzleClient(): Client
  470.     {
  471.         return new Client();
  472.     }
  473.     protected function getStripeManager(): StripeManager
  474.     {
  475.         return $this->get('stripe_manager');
  476.     }
  477.     protected function getFreshdeskManager(): FreshdeskManager
  478.     {
  479.         return $this->get('freshdesk_manager');
  480.     }
  481.     protected function getLoginLinkManager(): LoginLinkManager
  482.     {
  483.         return $this->get('login_link_manager');
  484.     }
  485.     protected function getMandrillManager(): MandrillManager
  486.     {
  487.         return $this->get('mandrill_manager');
  488.     }
  489.     protected function getStripeCredentials()
  490.     {
  491.         return $this->getContainerParameter('stripe');
  492.     }
  493.     protected function getContainerParameter(string $parameter)
  494.     {
  495.         return $this->locator->getParameter($parameter);
  496.     }
  497.     protected function setupStripe()
  498.     {
  499.         $apiKey $this->getStripeCredentials()['secret_key'];
  500.         Stripe::setApiKey($apiKey);
  501.     }
  502.     protected function getLogManager(): LogManager
  503.     {
  504.         return $this->get('log_manager');
  505.     }
  506.     protected function createLog(User $userCampaign $campaign$message, array $data = []): void
  507.     {
  508.         $this->getLogManager()->createLog($user$campaign$message$data);
  509.     }
  510.     protected function getNotificationManager(): NotificationManager
  511.     {
  512.         return $this->get('notification_manager');
  513.     }
  514.     protected function getKindfulManager(): KindfulService
  515.     {
  516.         return $this->get(KindfulService::class);
  517.     }
  518.     protected function getKindfulJobManager(): KindfulJobManager
  519.     {
  520.         return $this->get('kindful_job_manager');
  521.     }
  522.     protected function getMessageManager(): MessageManager
  523.     {
  524.         return $this->get('message_manager');
  525.     }
  526.     protected function getCustomMessagesManager(): CustomMessagesManager
  527.     {
  528.         return $this->get('custom_messages_manager');
  529.     }
  530.     protected function getActiveCampaignManager(): ActiveCampaignManager
  531.     {
  532.         return $this->get('active_campaign_manager');
  533.     }
  534.     protected function getPdfManager(): PdfManager
  535.     {
  536.         return $this->get('pdf_manager');
  537.     }
  538.     protected function getDisplayFeedManager(): DisplayFeedManager
  539.     {
  540.         return $this->get('display_feed_manager');
  541.     }
  542.     protected function getErrorMessageManager(): ErrorMessageManager
  543.     {
  544.         return $this->get('error_message_manager');
  545.     }
  546.     protected function getRequestStack(): RequestStack
  547.     {
  548.         return $this->get('request_stack');
  549.     }
  550.     protected function getOauthRegistry(): ClientRegistry
  551.     {
  552.         return $this->get('knpu.oauth2.registry');
  553.     }
  554.     protected function getKindfulContacts(): ContactsService
  555.     {
  556.         return $this->get(ContactsService::class);
  557.     }
  558.     protected function getTicketExtension(): TicketExtension
  559.     {
  560.         return $this->get(TicketExtension::class);
  561.     }
  562.     protected function getAuthorizationChecker(): AuthorizationCheckerInterface
  563.     {
  564.         return $this->get('security.authorization_checker');
  565.     }
  566.     protected function getRegistrationFormFactory(): FactoryInterface
  567.     {
  568.         return $this->get('fos_user.registration.form.factory');
  569.     }
  570. }