aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-09 12:52:06 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-09 12:52:06 +0100
commit89c03230c3d51e618608b044b0e3f45cf0c06a11 (patch)
tree504e54ecfd8ae6203f76a19a910e5e6c5dee1c3e /src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
parent8af35ad932177e0363412a868afc128b406e3322 (diff)
parent3b815d2de5a852fe2ebad5827bd4c9070aa175ea (diff)
downloadwallabag-89c03230c3d51e618608b044b0e3f45cf0c06a11.tar.gz
wallabag-89c03230c3d51e618608b044b0e3f45cf0c06a11.tar.zst
wallabag-89c03230c3d51e618608b044b0e3f45cf0c06a11.zip
Merge pull request #1062 from wallabag/v2-relation-entry-user
add a real relation between user and entry
Diffstat (limited to 'src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
new file mode 100644
index 00000000..fccd06be
--- /dev/null
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
@@ -0,0 +1,35 @@
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures\ORM;
4
5use Doctrine\Common\DataFixtures\AbstractFixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\CoreBundle\Entity\Entry;
9
10class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
11{
12 /**
13 * {@inheritDoc}
14 */
15 public function load(ObjectManager $manager)
16 {
17 $entry1 = new Entry($this->getReference('admin-user'));
18 $entry1->setUrl('http://0.0.0.0');
19 $entry1->setTitle('test title');
20 $entry1->setContent('This is my content /o/');
21
22 $manager->persist($entry1);
23 $manager->flush();
24
25 $this->addReference('entry1', $entry1);
26 }
27
28 /**
29 * {@inheritDoc}
30 */
31 public function getOrder()
32 {
33 return 20;
34 }
35}