Esempio n. 1
0
 /**
  * @param PersisterObjectInterface $object
  *
  * @return array
  *
  * @throws \Exception
  */
 public function find(PersisterObjectInterface $object)
 {
     //        var_dump($object);
     $module = $object->getModule();
     $container = $this->loadModel($module, $object->getContext(), $object);
     return $this->moduleManager->setModule($module)->find($container);
 }
Esempio n. 2
0
 /**
  * @param Resource $resource
  * @return Resource
  */
 public function delete(PersisterObjectInterface $object)
 {
     $context = $this->contextLanguageMediator->getContextManager()->getContext();
     $module = $object->getModule();
     $container = $this->objectManager->getRepository("BigfishEavBundle:Container")->findOneByResource($object->getId(), $module->getId(), $context->getId());
     //        exit;
     $this->eavPersister->delete($container);
     $object->setDeleted(new \DateTime("now"));
     $this->objectManager->persist($object);
     $this->objectManager->flush();
     return $object;
 }