/**
  * @inheritdoc
  */
 public function preUpdateEntity(ActivityBase $entity)
 {
     /**
      * @var \WCS\CantineBundle\Entity\Garderie $entity
      */
     $entity->setEnableEvening(true);
 }
 /**
  * @param Request $request
  * @param Form $form
  * @param $entity
  * @return bool
  */
 private function processForm(Request $request, Form $form, ActivityBase $entity)
 {
     $form->handleRequest($request);
     if ($form->isSubmitted() && $form->isValid()) {
         $key = $request->get('activity') . '_list_eleves';
         $this->setSessionValue($key, $request->get("list_eleves"));
         $entity->setStatus(ActivityBase::STATUS_NOT_REGISTERED);
         $entity->setDate($this->getDateDay());
         $this->mapper->preUpdateEntity($entity);
         $em = $this->getDoctrineManager();
         $em->persist($entity);
         $em->flush();
         return true;
     }
     return false;
 }