add order
All checks were successful
/ ls (pull_request) Successful in 27s
/ ls (push) Successful in 27s

This commit is contained in:
lubiana 2024-06-14 17:41:00 +02:00
parent 7663f684a4
commit 1dc5306967
No known key found for this signature in database
37 changed files with 1060 additions and 113 deletions

View file

@ -0,0 +1,26 @@
<?php declare(strict_types=1);
namespace App\Repository;
use App\Entity\FoodOrder;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<FoodOrder>
*/
final class FoodOrderRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, FoodOrder::class);
}
public function save(FoodOrder $order): void
{
$this->getEntityManager()
->persist($order);
$this->getEntityManager()
->flush();
}
}