|
@@ -0,0 +1,38 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace IPv4Bundle\Form;
|
|
|
+
|
|
|
+use Symfony\Component\Form\AbstractType;
|
|
|
+use Symfony\Component\Form\FormBuilderInterface;
|
|
|
+use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
+
|
|
|
+class PoolType extends AbstractType
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function buildForm(FormBuilderInterface $builder, array $options)
|
|
|
+ {
|
|
|
+ $builder->add('name')->add('firstIp')->add('lastIp')->add('priority')->add('isStatic')->add('tenancyId')->add('subNet');
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function configureOptions(OptionsResolver $resolver)
|
|
|
+ {
|
|
|
+ $resolver->setDefaults(array(
|
|
|
+ 'data_class' => 'IPv4Bundle\Entity\Pool'
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function getBlockPrefix()
|
|
|
+ {
|
|
|
+ return 'ipv4bundle_pool';
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|