X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FDataFixtures%2FORM%2FLoadTagData.php;h=0ecfd18b55ddab8c00f1616586f78a9f576af5c3;hb=060f3ce34c6af5cb8baaa916bfc17c193c02b569;hp=6b13c2beec31970d40b35127a2cd164c44408ef2;hpb=2691cf04384239c546e141af6cc3c22b210dae58;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php index 6b13c2be..0ecfd18b 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadTagData.php @@ -10,33 +10,46 @@ use Wallabag\CoreBundle\Entity\Tag; class LoadTagData extends AbstractFixture implements OrderedFixtureInterface { /** - * {@inheritDoc} + * {@inheritdoc} */ public function load(ObjectManager $manager) { $tag1 = new Tag(); - $tag1->setLabel('foo'); + $tag1->setLabel('foo bar'); $manager->persist($tag1); + $this->addReference('foo-bar-tag', $tag1); + $tag2 = new Tag(); $tag2->setLabel('bar'); $manager->persist($tag2); + $this->addReference('bar-tag', $tag2); + $tag3 = new Tag(); $tag3->setLabel('baz'); $manager->persist($tag3); + $this->addReference('baz-tag', $tag3); + + $tag4 = new Tag(); + $tag4->setLabel('foo'); + + $manager->persist($tag4); + + $this->addReference('foo-tag', $tag4); + $manager->flush(); } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getOrder() { - return 30; + return 25; } }