aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-11-26 20:00:01 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-11-28 22:04:54 +0100
commitdb9b6d8d0d9f943fe321ea690701662dac828e94 (patch)
tree165dae22924a69a087f01434d131b5e389b10535 /src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php
parent9394e8098a92c849d15c43dcd0c338887bff68ce (diff)
downloadwallabag-db9b6d8d0d9f943fe321ea690701662dac828e94.tar.gz
wallabag-db9b6d8d0d9f943fe321ea690701662dac828e94.tar.zst
wallabag-db9b6d8d0d9f943fe321ea690701662dac828e94.zip
Update fixtures
Diffstat (limited to 'src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php')
-rw-r--r--src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php b/src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php
deleted file mode 100644
index 20e07fa3..00000000
--- a/src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php
+++ /dev/null
@@ -1,45 +0,0 @@
1<?php
2
3namespace Wallabag\AnnotationBundle\DataFixtures\ORM;
4
5use Doctrine\Common\DataFixtures\AbstractFixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\AnnotationBundle\Entity\Annotation;
9
10class LoadAnnotationData extends AbstractFixture implements OrderedFixtureInterface
11{
12 /**
13 * {@inheritdoc}
14 */
15 public function load(ObjectManager $manager)
16 {
17 $annotation1 = new Annotation($this->getReference('admin-user'));
18 $annotation1->setEntry($this->getReference('entry1'));
19 $annotation1->setText('This is my annotation /o/');
20 $annotation1->setQuote('content');
21
22 $manager->persist($annotation1);
23
24 $this->addReference('annotation1', $annotation1);
25
26 $annotation2 = new Annotation($this->getReference('admin-user'));
27 $annotation2->setEntry($this->getReference('entry2'));
28 $annotation2->setText('This is my 2nd annotation /o/');
29 $annotation2->setQuote('content');
30
31 $manager->persist($annotation2);
32
33 $this->addReference('annotation2', $annotation2);
34
35 $manager->flush();
36 }
37
38 /**
39 * {@inheritdoc}
40 */
41 public function getOrder()
42 {
43 return 35;
44 }
45}