protected function _report(Intervention $entity)
 {
     if (!$entity instanceof Fixing) {
         throw new \Exception('entity must be a Fixing');
     }
     $this->ln(3);
     $this->cellH3('Constat');
     $this->cellLi($entity->getObservation());
     $this->ln(3);
     $this->cellH3('Action menée');
     $this->cellLi($entity->getReport());
     if ($entity->getRest() != null) {
         $this->ln(15);
         if ($entity->getAskQuote()) {
             $this->cellStrong('Nous vous enverrons dans les meilleurs délais, un devis de remise en état concernant les travaux de réparation nécessaire');
             // à savoir :');
         } elseif ($entity->getWork()) {
             $this->cellStrong('Nous nous engageons pour le remplacement des pièces nécessaires le plus rapidement possible selon la disponibilité de notre fabriquant');
             // à savoir :');
         } else {
             $this->cellStrong('Reste à faire :');
         }
         //		$this->ln(3);
         //		$this->cellLiStrong($entity->getRest());
     }
 }
 private function _line(Intervention $entity)
 {
     $types = array('fixing' => 'Dépannage', 'maintenance' => 'Entretien', 'work' => 'Travaux');
     $dayTrans = array('dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi');
     $datas[0] = $dayTrans[$entity->getClose()->format('w')] . chr(10) . $entity->getClose()->format('d/m/Y');
     $datas[1] = $entity->getDoor()->getTrustee();
     $datas[2] = $entity->getDoor()->getSite()->getAddress() . '';
     $datas[3] = $types[$entity->getType()];
     $datas[4] = $entity->getContract() == 'Hors contrat' ? 'HC' : $entity->getDynContract();
     $datas[5] = $entity->getReason();
     $datas[6] = 'Rapport :' . chr(10) . $entity->getReport();
     if ($entity->getRest()) {
         $datas[6] .= chr(10) . chr(10) . 'Reste à faire :' . chr(10) . $entity->getRest();
     }
     $this->row($datas, 5, 1, false);
 }