コード例 #1
0
ファイル: DynamicRegistry.php プロジェクト: payum/core
 /**
  * {@inheritDoc}
  */
 public function getGatewayFactories()
 {
     // @deprecated It will return empty array here
     if ($this->backwardCompatibility && $this->gatewayFactoryRegistry instanceof RegistryInterface) {
         return $this->gatewayFactoryRegistry->getGatewayFactories();
     }
     return [];
 }
コード例 #2
0
 /**
  * @return JsonResponse
  */
 public function getAllAction()
 {
     $normalizedFactories = [];
     foreach ($this->registry->getGatewayFactories() as $name => $factory) {
         $gatewayConfig = new GatewayConfig();
         $gatewayConfig->setFactoryName($name);
         $form = $this->formFactory->create('payum_gateway_config', $gatewayConfig, ['csrf_protection' => false, 'data_class' => GatewayConfig::class]);
         $normalizedFactories[$name]['config'] = $this->formToJsonConverter->convertMeta($form->get('config'));
     }
     $form = $this->formFactory->create('payum_gateway_config', null, ['csrf_protection' => false, 'data_class' => GatewayConfig::class]);
     return new JsonResponse(array('generic' => $this->formToJsonConverter->convertMeta($form), 'meta' => $normalizedFactories));
 }