/**
  * {@inheritdoc}
  */
 public function onSuccess()
 {
     switch ($this->request->getMethod()) {
         case 'GET':
             return false;
         case 'DELETE':
             $this->om->remove($this->entity);
             break;
         default:
             $this->om->persist($this->form->getData());
     }
     $this->om->flush();
     return true;
 }