diff options
author | lizyn <zhiylin@outlook.com> | 2020-02-24 10:04:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 10:04:13 +0800 |
commit | b19df31d78d881a43bcf6b3215e5fc3781e8e8aa (patch) | |
tree | d0d9861694a4b5e5fbfdbeb53c255ecd15fe9328 /src/Wallabag/AnnotationBundle | |
parent | 4d0c632c70ea50d459c3c55ddda2e0f394dd51cb (diff) | |
parent | 04d918cae0227c06a41d27fb6533dddbf30dfe71 (diff) | |
download | wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.gz wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.zst wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.zip |
Merge pull request #1 from wallabag/master
Keep up with the master again
Diffstat (limited to 'src/Wallabag/AnnotationBundle')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php | 10 | ||||
-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.php | 3 |
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 | ||
3 | namespace Wallabag\AnnotationBundle\DataFixtures\ORM; | 3 | namespace Wallabag\AnnotationBundle\DataFixtures; |
4 | 4 | ||
5 | use Doctrine\Common\DataFixtures\AbstractFixture; | 5 | use Doctrine\Bundle\FixturesBundle\Fixture; |
6 | use Doctrine\Common\DataFixtures\OrderedFixtureInterface; | 6 | use Doctrine\Common\DataFixtures\DependentFixtureInterface; |
7 | use Doctrine\Common\Persistence\ObjectManager; | 7 | use Doctrine\Common\Persistence\ObjectManager; |
8 | use Wallabag\AnnotationBundle\Entity\Annotation; | 8 | use Wallabag\AnnotationBundle\Entity\Annotation; |
9 | use Wallabag\CoreBundle\DataFixtures\EntryFixtures; | ||
10 | use Wallabag\UserBundle\DataFixtures\UserFixtures; | ||
9 | 11 | ||
10 | class LoadAnnotationData extends AbstractFixture implements OrderedFixtureInterface | 12 | class 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, |