33 lines
758 B
PHP
33 lines
758 B
PHP
<?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())
|
|
->setCodeBarre('123456-FF-POCHE')
|
|
->setPocheNumber(3)
|
|
;
|
|
$manager->persist($dmuCat1);
|
|
|
|
$dmuCat2 = (new DmuCat())
|
|
->setCodeBarre('123456-BB-POCHE')
|
|
->setPocheNumber(4)
|
|
;
|
|
$manager->persist($dmuCat2);
|
|
|
|
$dmuCat3 = (new DmuCat())
|
|
->setCodeBarre('123456-CC-POCHE')
|
|
->setPocheNumber(5)
|
|
;
|
|
$manager->persist($dmuCat3);
|
|
|
|
$manager->flush();
|
|
}
|
|
} |