|
@@ -0,0 +1,63 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace RadiusBundle\Form;
|
|
|
+
|
|
|
+use Symfony\Component\Form\AbstractType;
|
|
|
+use Symfony\Component\Form\FormBuilderInterface;
|
|
|
+use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
+
|
|
|
+use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
|
+
|
|
|
+use Symfony\Component\Form\FormEvent;
|
|
|
+use Symfony\Component\Form\FormEvents;
|
|
|
+
|
|
|
+class AccessType extends AbstractType
|
|
|
+{
|
|
|
+
|
|
|
+ protected $webservice = null;
|
|
|
+
|
|
|
+ public function setWebService($ws)
|
|
|
+ {
|
|
|
+ $this->webservice = $ws;
|
|
|
+ }
|
|
|
+
|
|
|
+ protected $em = null;
|
|
|
+
|
|
|
+ public function setEntityManager($em)
|
|
|
+ {
|
|
|
+ $this->em = $em;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function buildForm(FormBuilderInterface $builder, array $options)
|
|
|
+ {
|
|
|
+ $builder->add('id')
|
|
|
+ ->add('profile')
|
|
|
+ ->add('clientId')
|
|
|
+ ->add('name')
|
|
|
+ ->add('password')
|
|
|
+ ->add('static_ip')
|
|
|
+ ->add('tenancyId');
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function configureOptions(OptionsResolver $resolver)
|
|
|
+ {
|
|
|
+ $resolver->setDefaults(array(
|
|
|
+ 'data_class' => 'RadiusBundle\Entity\Access',
|
|
|
+ 'csrf_protection' => false
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function getBlockPrefix()
|
|
|
+ {
|
|
|
+ return 'radiusbundle_access';
|
|
|
+ }
|
|
|
+}
|