From 83e8b117db388e39f75716de1770ae1d9bd147dc Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 27 Oct 2021 18:10:35 +0200 Subject: [PATCH] start of Relationship fixture --- .../ChillPersonBundle/DataFixtures/ORM/LoadRelations.php | 3 +++ .../ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php | 0 2 files changed, 3 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelations.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelations.php index bcd7df547..2b72052c6 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelations.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelations.php @@ -10,6 +10,8 @@ use Doctrine\Persistence\ObjectManager; class LoadRelations extends Fixture implements FixtureGroupInterface { + public const RELATIONS = 'relations'; + public static function getGroups(): array { return ['person_relations']; @@ -36,6 +38,7 @@ class LoadRelations extends Fixture implements FixtureGroupInterface $relation->setTitle($value['title']) ->setReverseTitle($value['reverseTitle']); $manager->persist($relation); + $this->addReference(self::RELATIONS, $relation); } $manager->flush(); diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php new file mode 100644 index 000000000..e69de29bb