- header('Content-Type: text/plain');
-
- //Infraction
- var_dump($data['offense']);
-
- //Numéro d'avis
- var_dump($data['notice']);
-
- //Numéro d'agent
- var_dump($data['agent']);
-
- //Code service
- var_dump($data['service']);
-
- //Masque porté
- var_dump($data['mask']);
+ //Gathering offense
+ if (!empty($data['offense']) && $data['offense'] == 'gathering') {
+ //Add gathering
+ $output = DisputePdf::genGathering($data['court'], $data['notice'], $data['agent'], $data['service'], $data['abstract'], $this->translator->trans($this->getUser()->getCivility()->getTitle()), $this->getUser()->getForename(), $this->getUser()->getSurname());
+ //Traffic offense
+ } elseif (!empty($data['offense'] && $data['offense'] == 'traffic')) {
+ //Add traffic
+ $output = DisputePdf::genTraffic($data['court'], $data['notice'], $data['agent'], $data['service'], $data['abstract'], $this->translator->trans($this->getUser()->getCivility()->getTitle()), $this->getUser()->getForename(), $this->getUser()->getSurname());
+ //Unsupported offense
+ } else {
+ header('Content-Type: text/plain');
+ die('TODO');
+ exit;
+ }