/**
  * Get Transmitters
  * @return array
  */
 public function getTransmitters()
 {
     $transmitters = array();
     for ($i = $this->getFirst(); $i <= $this->getLast(); $i++) {
         $transmitter = new Transmitter();
         $transmitter->setNumber($i);
         $transmitter->setUserGroup($this->getUserGroup());
         $transmitter->setModel($this->getModel());
         $transmitter->setGuarantee($this->getGuarantee());
         $transmitter->setAttribution($this->getAttribution());
         $transmitters[] = $transmitter;
     }
     return $transmitters;
 }
 /**
  * Reactive Transmitter entity.
  *
  * @Route("/{id}/reactive", name="transmitter_reactive")
  */
 public function reactiveAction(Transmitter $entity)
 {
     $entity->setIsActive(true);
     $em = $this->getDoctrine()->getManager();
     $em->persist($entity);
     $em->flush();
     return $this->redirect($this->get('request')->headers->get('referer'));
 }
 /**
  * Get Transmitters
  * @return array
  */
 public function getNew()
 {
     if ($this->getOld() === null) {
         return null;
     }
     $transmitter = new Transmitter();
     $transmitter->setModel($this->getOld()->getModel());
     $transmitter->setUserGroup($this->getOld()->getUserGroup());
     $transmitter->setNumber($this->getNewNumber());
     $transmitter->setGuarantee($this->getGuarantee());
     $transmitter->setAttribution($this->getAttribution());
     return $transmitter;
 }