Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents a3d3aba + 98ce0e9 commit 6651290abf98d6e6f86e8c2f50732f725d0fae6f @SamuelHassine SamuelHassine committed Jan 11, 2017
@@ -116,6 +116,7 @@ public function postExercisesEventsIncidentsAction(Request $request)
$incident = new Incident();
$incident->setIncidentEvent($event);
+ $incident->setIncidentOrder(0);
$form = $this->createForm(IncidentType::class, $incident);
$form->submit($request->request->all());
@@ -108,6 +108,7 @@ public function postExercisesEventsAction(Request $request)
$file = $em->getRepository('APIBundle:File')->findOneBy(['file_name' => 'Event default']);
$event->setEventExercise($exercise);
$event->setEventImage($file);
+ $event->setEventOrder(0);
$em->persist($event);
$em->flush();
@@ -47,6 +47,11 @@ class Event
*/
protected $event_image;
+ /**
+ * @ORM\Column(type="smallint")
+ */
+ protected $event_order = 0;
+
public function __construct()
{
$this->event_incidents = new ArrayCollection();
@@ -117,4 +122,15 @@ public function setEventImage($image)
$this->event_image = $image;
return $this;
}
+
+ public function getEventOrder()
+ {
+ return $this->event_order;
+ }
+
+ public function setEventOrder($order)
+ {
+ $this->event_order = $order;
+ return $this;
+ }
}
@@ -68,6 +68,11 @@ class Incident
*/
protected $incident_injects;
+ /**
+ * @ORM\Column(type="smallint")
+ */
+ protected $incident_order = 0;
+
protected $incident_exercise;
public function __construct()
@@ -175,6 +180,17 @@ public function setIncidentInjects($injects)
return $this;
}
+ public function getIncidentOrder()
+ {
+ return $this->incident_order;
+ }
+
+ public function setIncidentOrder($order)
+ {
+ $this->incident_order = $order;
+ return $this;
+ }
+
public function getIncidentExercise()
{
return $this->incident_exercise;
@@ -13,6 +13,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('event_title');
$builder->add('event_description');
+ $builder->add('event_order');
}
public function configureOptions(OptionsResolver $resolver)
@@ -16,6 +16,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder->add('incident_type');
$builder->add('incident_weight');
$builder->add('incident_subobjectives');
+ $builder->add('incident_order');
}
public function configureOptions(OptionsResolver $resolver)
@@ -11,4 +11,6 @@ APIBundle\Entity\Event:
event_exercise:
groups: ['event']
event_incidents:
+ groups: ['event']
+ event_order:
groups: ['event']
@@ -19,4 +19,6 @@ APIBundle\Entity\Incident:
incident_outcome:
groups: ['incident']
incident_exercise:
- groups: ['incident']
+ groups: ['incident']
+ incident_order:
+ groups: ['incident']
@@ -124,6 +124,8 @@ APIBundle\Entity\Event:
event_description:
- NotBlank: ~
- Type: string
+ event_order:
+ - Type: integer
APIBundle\Entity\Incident:
properties:
@@ -135,6 +137,8 @@ APIBundle\Entity\Incident:
- Type: string
incident_weight:
- NotBlank: ~
+ incident_order:
+ - Type: integer
APIBundle\Entity\Inject:
properties:

0 comments on commit 6651290

Please sign in to comment.