Browse Source

Se agrega administrativeState al retorno del Rest y se define en 'active' su valor por defecto.

Maximiliano Schvindt 8 years ago
parent
commit
b87975978c
2 changed files with 9 additions and 2 deletions
  1. 1 1
      src/FTTHBundle/Entity/ONU.php
  2. 8 1
      src/FTTHBundle/Form/ONUType.php

+ 1 - 1
src/FTTHBundle/Entity/ONU.php

@@ -83,7 +83,7 @@ class ONU
     protected $currentState = null;
     
     /**
-     * @ORM\Column(type="string", nullable=true) 
+     * @ORM\Column(type="string", nullable=true, options={"default": "active"}) 
      */
     protected $administrativeState = 'active';
 

+ 8 - 1
src/FTTHBundle/Form/ONUType.php

@@ -13,7 +13,14 @@ class ONUType extends AbstractType
      */
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
-        $builder->add('ip')->add('mac')->add('serialNumber')->add('ponSerialNumber')->add('clientId')->add('currentState')->add('transitionState');
+        $builder->add('ip')
+                ->add('mac')
+                ->add('serialNumber')
+                ->add('ponSerialNumber')
+                ->add('clientId')
+                ->add('administrativeState')
+                ->add('currentState')
+                ->add('transitionState');
     }
     
     /**