aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/AnnotationBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/AnnotationBundle')
-rw-r--r--src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php10
-rw-r--r--src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php (renamed from src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php)17
-rw-r--r--src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php3
3 files changed, 13 insertions, 17 deletions
diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php
index 3a7421c7..883ce4a8 100644
--- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php
+++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php
@@ -16,8 +16,6 @@ class WallabagAnnotationController extends FOSRestController
16 /** 16 /**
17 * Retrieve annotations for an entry. 17 * Retrieve annotations for an entry.
18 * 18 *
19 * @param Entry $entry
20 *
21 * @see Wallabag\ApiBundle\Controller\WallabagRestController 19 * @see Wallabag\ApiBundle\Controller\WallabagRestController
22 * 20 *
23 * @return JsonResponse 21 * @return JsonResponse
@@ -39,9 +37,6 @@ class WallabagAnnotationController extends FOSRestController
39 /** 37 /**
40 * Creates a new annotation. 38 * Creates a new annotation.
41 * 39 *
42 * @param Request $request
43 * @param Entry $entry
44 *
45 * @return JsonResponse 40 * @return JsonResponse
46 * 41 *
47 * @see Wallabag\ApiBundle\Controller\WallabagRestController 42 * @see Wallabag\ApiBundle\Controller\WallabagRestController
@@ -79,9 +74,6 @@ class WallabagAnnotationController extends FOSRestController
79 * 74 *
80 * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") 75 * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
81 * 76 *
82 * @param Annotation $annotation
83 * @param Request $request
84 *
85 * @return JsonResponse 77 * @return JsonResponse
86 */ 78 */
87 public function putAnnotationAction(Annotation $annotation, Request $request) 79 public function putAnnotationAction(Annotation $annotation, Request $request)
@@ -114,8 +106,6 @@ class WallabagAnnotationController extends FOSRestController
114 * 106 *
115 * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") 107 * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
116 * 108 *
117 * @param Annotation $annotation
118 *
119 * @return JsonResponse 109 * @return JsonResponse
120 */ 110 */
121 public function deleteAnnotationAction(Annotation $annotation) 111 public function deleteAnnotationAction(Annotation $annotation)
diff --git a/src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php b/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php
index 20e07fa3..ed46cea9 100644
--- a/src/Wallabag/AnnotationBundle/DataFixtures/ORM/LoadAnnotationData.php
+++ b/src/Wallabag/AnnotationBundle/DataFixtures/AnnotationFixtures.php
@@ -1,13 +1,15 @@
1<?php 1<?php
2 2
3namespace Wallabag\AnnotationBundle\DataFixtures\ORM; 3namespace Wallabag\AnnotationBundle\DataFixtures;
4 4
5use Doctrine\Common\DataFixtures\AbstractFixture; 5use Doctrine\Bundle\FixturesBundle\Fixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface; 6use Doctrine\Common\DataFixtures\DependentFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager; 7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\AnnotationBundle\Entity\Annotation; 8use Wallabag\AnnotationBundle\Entity\Annotation;
9use Wallabag\CoreBundle\DataFixtures\EntryFixtures;
10use Wallabag\UserBundle\DataFixtures\UserFixtures;
9 11
10class LoadAnnotationData extends AbstractFixture implements OrderedFixtureInterface 12class AnnotationFixtures extends Fixture implements DependentFixtureInterface
11{ 13{
12 /** 14 /**
13 * {@inheritdoc} 15 * {@inheritdoc}
@@ -38,8 +40,11 @@ class LoadAnnotationData extends AbstractFixture implements OrderedFixtureInterf
38 /** 40 /**
39 * {@inheritdoc} 41 * {@inheritdoc}
40 */ 42 */
41 public function getOrder() 43 public function getDependencies()
42 { 44 {
43 return 35; 45 return [
46 EntryFixtures::class,
47 UserFixtures::class,
48 ];
44 } 49 }
45} 50}
diff --git a/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php b/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php
index c73c3ded..48bc2c59 100644
--- a/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php
+++ b/src/Wallabag/AnnotationBundle/Form/NewAnnotationType.php
@@ -17,7 +17,8 @@ class NewAnnotationType extends AbstractType
17 'empty_data' => '', 17 'empty_data' => '',
18 ]) 18 ])
19 ->add('quote', null, [ 19 ->add('quote', null, [
20 'empty_data' => null, 20 'empty_data' => '',
21 'trim' => false,
21 ]) 22 ])
22 ->add('ranges', CollectionType::class, [ 23 ->add('ranges', CollectionType::class, [
23 'entry_type' => RangeType::class, 24 'entry_type' => RangeType::class,