Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function save($entity, $andFlush = true)
 {
     foreach ($entity->getBasketElements() as $element) {
         $element->setBasket($entity);
     }
     parent::save($entity, $andFlush);
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function save($message, $andFlush = true)
 {
     //Hack for ConsumerHandlerCommand->optimize()
     if ($message->getId() && !$this->om->getUnitOfWork()->isInIdentityMap($message)) {
         $this->getEntityManager()->getUnitOfWork()->merge($message);
     }
     parent::save($message, $andFlush);
 }
 /**
  * {@inheritdoc}
  */
 public function save($media, $andFlush = true)
 {
     /*
      * Warning: previous method signature was : save(MediaInterface $media, $context = null, $providerName = null)
      */
     // BC compatibility for $context parameter
     if ($andFlush && is_string($andFlush)) {
         $media->setContext($andFlush);
     }
     // BC compatibility for $providerName parameter
     if (3 == func_num_args()) {
         $media->setProviderName(func_get_arg(2));
     }
     if ($andFlush && is_bool($andFlush)) {
         parent::save($media, $andFlush);
     } else {
         // BC compatibility with previous signature
         parent::save($media, true);
     }
 }
Esempio n. 4
0
 /**
  * {@inheritdoc}
  */
 public function save($block, $andFlush = true)
 {
     parent::save($block, $andFlush);
     return $block;
 }
 /**
  * {@inheritdoc}
  */
 public function save($page, $andFlush = true)
 {
     if (!$page->isHybrid()) {
         $this->fixUrl($page);
     }
     parent::save($page, $andFlush);
     return $page;
 }
Esempio n. 6
0
 /**
  * {@inheritdoc}
  */
 public function save($order, $andFlush = true)
 {
     $this->getEntityManager()->persist($order->getCustomer());
     parent::save($order, $andFlush);
 }
Esempio n. 7
0
 /**
  * {@inheritDoc}
  */
 public function save($comment, $andFlush = true)
 {
     parent::save($comment, $andFlush);
     $this->updateCommentsCount($comment->getPost());
 }
 /**
  * {@inheritdoc}
  */
 public function save($site, $andFlush = true)
 {
     parent::save($site, $andFlush);
     return $site;
 }
Esempio n. 9
0
 /**
  * {@inheritdoc}
  */
 public function save($snapshot, $andFlush = true)
 {
     parent::save($snapshot);
     return $snapshot;
 }
Esempio n. 10
0
 /**
  * BC Compatibility.
  *
  * @deprecated Please use save() from now
  *
  * @param GalleryInterface $gallery
  */
 public function update(GalleryInterface $gallery)
 {
     parent::save($gallery);
 }
 /**
  * {@inheritdoc}
  */
 public function save($dashboard, $andFlush = true)
 {
     parent::save($dashboard, $andFlush);
     return $dashboard;
 }
Esempio n. 12
0
 /**
  * {@inheritdoc}
  */
 public function save($page, $andFlush = true)
 {
     parent::save($page, $andFlush);
     return $page;
 }