aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CommentBundle/DataFixtures/ORM/LoadCommentData.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-02-07 16:52:59 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-02-26 18:13:17 +0100
commitf38e03dc02c96344677fd2720912605b21c90b5d (patch)
tree2028cecf5d0930e1569ddb977e245ea44bedc38a /src/Wallabag/CommentBundle/DataFixtures/ORM/LoadCommentData.php
parentd3f1a9dc1ac181033ec54f9149d2807199fa8f17 (diff)
downloadwallabag-f38e03dc02c96344677fd2720912605b21c90b5d.tar.gz
wallabag-f38e03dc02c96344677fd2720912605b21c90b5d.tar.zst
wallabag-f38e03dc02c96344677fd2720912605b21c90b5d.zip
Comment work with annotator v2
- add missing annotator.js file and fix typo - edit & delete routes, started tests - basic tests
Diffstat (limited to 'src/Wallabag/CommentBundle/DataFixtures/ORM/LoadCommentData.php')
-rw-r--r--src/Wallabag/CommentBundle/DataFixtures/ORM/LoadCommentData.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/Wallabag/CommentBundle/DataFixtures/ORM/LoadCommentData.php b/src/Wallabag/CommentBundle/DataFixtures/ORM/LoadCommentData.php
new file mode 100644
index 00000000..717f4863
--- /dev/null
+++ b/src/Wallabag/CommentBundle/DataFixtures/ORM/LoadCommentData.php
@@ -0,0 +1,45 @@
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\CommentBundle\Entity\Comment;
9
10class LoadCommentData extends AbstractFixture implements OrderedFixtureInterface
11{
12 /**
13 * {@inheritdoc}
14 */
15 public function load(ObjectManager $manager)
16 {
17 $comment1 = new Comment($this->getReference('admin-user'));
18 $comment1->setEntry($this->getReference('entry1'));
19 $comment1->setText('This is my comment /o/');
20 $comment1->setQuote('content');
21
22 $manager->persist($comment1);
23
24 $this->addReference('comment1', $comment1);
25
26 $comment2 = new Comment($this->getReference('admin-user'));
27 $comment2->setEntry($this->getReference('entry2'));
28 $comment2->setText('This is my 2nd comment /o/');
29 $comment2->setQuote('content');
30
31 $manager->persist($comment2);
32
33 $this->addReference('comment2', $comment2);
34
35 $manager->flush();
36 }
37
38 /**
39 * {@inheritdoc}
40 */
41 public function getOrder()
42 {
43 return 35;
44 }
45}