aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-24 07:42:09 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 20:50:31 +0100
commit46bbd8d321e6a00131f0e6ed96fa6f3d693b3678 (patch)
tree331d511837716ec7a7956c35f51dc3a14a1ca11c /src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
parent6c87418ff013cfd03093c3f01e20518e580d80bb (diff)
downloadwallabag-46bbd8d321e6a00131f0e6ed96fa6f3d693b3678.tar.gz
wallabag-46bbd8d321e6a00131f0e6ed96fa6f3d693b3678.tar.zst
wallabag-46bbd8d321e6a00131f0e6ed96fa6f3d693b3678.zip
relation between tags and entries
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
index 3be323ed..edab9adc 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
@@ -6,6 +6,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface; 6use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager; 7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\CoreBundle\Entity\Entry; 8use Wallabag\CoreBundle\Entity\Entry;
9use Wallabag\CoreBundle\Entity\Tag;
9 10
10class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface 11class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
11{ 12{
@@ -37,6 +38,14 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
37 $entry3->setTitle('test title entry3'); 38 $entry3->setTitle('test title entry3');
38 $entry3->setContent('This is my content /o/'); 39 $entry3->setContent('This is my content /o/');
39 40
41 $tag1 = new Tag();
42 $tag1->setLabel("foo");
43 $tag2 = new Tag();
44 $tag2->setLabel("bar");
45
46 $entry3->addTag($tag1);
47 $entry3->addTag($tag2);
48
40 $manager->persist($entry3); 49 $manager->persist($entry3);
41 50
42 $this->addReference('entry3', $entry3); 51 $this->addReference('entry3', $entry3);