public function editAction(Request $request, Advert $advert)
    {
        
        $deleteForm = $this->createDeleteForm($advert);
        $editForm = $this->createEditForm($advert);
        $editForm->handleRequest($request);

        if ($editForm->isSubmitted() && $editForm->isValid()) {
            $em = $this->getDoctrine()->getManager();
            
            if($advert->getRemoveImage()){
                $advert->setImage(null);
            }
            
            $em->persist($advert);
            $em->flush();
            
            $this->get('session')->getFlashBag()->add('success', 'advert.edited');
            
            return $this->redirectToRoute('ecommerce_advert_edit', array('id' => $advert->getId()));
        }

        return array(
            'entity' => $advert,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }