mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
start of Relationship fixture
This commit is contained in:
parent
6752a2f6d3
commit
83e8b117db
@ -10,6 +10,8 @@ use Doctrine\Persistence\ObjectManager;
|
|||||||
|
|
||||||
class LoadRelations extends Fixture implements FixtureGroupInterface
|
class LoadRelations extends Fixture implements FixtureGroupInterface
|
||||||
{
|
{
|
||||||
|
public const RELATIONS = 'relations';
|
||||||
|
|
||||||
public static function getGroups(): array
|
public static function getGroups(): array
|
||||||
{
|
{
|
||||||
return ['person_relations'];
|
return ['person_relations'];
|
||||||
@ -36,6 +38,7 @@ class LoadRelations extends Fixture implements FixtureGroupInterface
|
|||||||
$relation->setTitle($value['title'])
|
$relation->setTitle($value['title'])
|
||||||
->setReverseTitle($value['reverseTitle']);
|
->setReverseTitle($value['reverseTitle']);
|
||||||
$manager->persist($relation);
|
$manager->persist($relation);
|
||||||
|
$this->addReference(self::RELATIONS, $relation);
|
||||||
}
|
}
|
||||||
|
|
||||||
$manager->flush();
|
$manager->flush();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user