Example #1
0
 /**
  * @param FormBuilderInterface $builder
  * @param array                $options
  *
  * todo: ограничить виды кошельков
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('type', 'choice', ['choices' => Wallet::getTypes()])->add('number');
 }
Example #2
0
 /**
  * Типы кошельков
  *
  * @ApiDoc(
  *     section="Billing API",
  *     output="array",
  *     statusCodes={
  *         200="Returned when successful",
  *         403="Returned when the user is not authorized to use this method"
  *     }
  * )
  *
  * @return Response
  */
 public function getWalletTypesAction()
 {
     $view = new View(Wallet::getTypes());
     return $this->handleView($view);
 }