EthikTag/src/DataFixtures/CatDmuFixtures.php

33 lines
758 B
PHP
Raw Normal View History

2023-01-09 08:22:34 +01:00
<?php
namespace App\DataFixtures;
use App\Entity\DmuCat;
use Doctrine\Persistence\ObjectManager;
use Doctrine\Bundle\FixturesBundle\Fixture;
class CatDmuFixtures extends Fixture
{
public function load(ObjectManager $manager): void
{
$dmuCat1 = (new DmuCat())
2023-05-23 16:06:53 +02:00
->setCodeBarre('123456-FF-POCHE')
2023-01-09 08:22:34 +01:00
->setPocheNumber(3)
;
$manager->persist($dmuCat1);
$dmuCat2 = (new DmuCat())
2023-05-23 16:06:53 +02:00
->setCodeBarre('123456-BB-POCHE')
2023-01-09 08:22:34 +01:00
->setPocheNumber(4)
;
$manager->persist($dmuCat2);
$dmuCat3 = (new DmuCat())
2023-05-23 16:06:53 +02:00
->setCodeBarre('123456-CC-POCHE')
2023-01-09 08:22:34 +01:00
->setPocheNumber(5)
;
$manager->persist($dmuCat3);
$manager->flush();
}
}