new importfiles

This commit is contained in:
Marko
2023-02-28 11:27:27 +01:00
parent 9bf0994b25
commit 48230c73a6
6 changed files with 41 additions and 24 deletions

View File

@@ -21,7 +21,7 @@ class ProductRepository extends ServiceEntityRepository
parent::__construct($registry, Product::class);
}
public function save(Product $entity, bool $flush = false): void
public function save(Product $entity, bool $flush = false): ?int
{
$entity->setUpdateTime(new \DateTime());
@@ -31,6 +31,8 @@ class ProductRepository extends ServiceEntityRepository
if ($flush) {
$this->getEntityManager()->flush();
}
return $entity->getId();
}
public function remove(Product $entity, bool $flush = false): void

View File

@@ -21,7 +21,7 @@ class WarehouseRepository extends ServiceEntityRepository
parent::__construct($registry, Warehouse::class);
}
public function save(Warehouse $entity, bool $flush = false): void
public function save(Warehouse $entity, bool $flush = false): ?int
{
$entity->setPrio(0);
$this->getEntityManager()->persist($entity);
@@ -29,6 +29,8 @@ class WarehouseRepository extends ServiceEntityRepository
if ($flush) {
$this->getEntityManager()->flush();
}
return $entity->getId();
}
public function remove(Warehouse $entity, bool $flush = false): void