/**
  * {@inheritdoc}
  */
 public function update($data)
 {
     if ($this->crudManager instanceof CrudManagerInterface) {
         $this->crudManager->update($data);
     } else {
         $this->entityManager->persist($data);
     }
     $this->entityManager->flush($data);
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function update($data)
 {
     if (!$data instanceof \Persistent) {
         throw new \InvalidArgumentException('The $data instance is not supported by the Propel implementation');
     }
     if ($this->crudManager instanceof CrudManagerInterface) {
         $this->crudManager->add($data);
     } else {
         $data->save();
     }
 }