diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-02-07 16:52:59 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-26 18:13:17 +0100 |
commit | f38e03dc02c96344677fd2720912605b21c90b5d (patch) | |
tree | 2028cecf5d0930e1569ddb977e245ea44bedc38a /src/Wallabag/CoreBundle/Entity | |
parent | d3f1a9dc1ac181033ec54f9149d2807199fa8f17 (diff) | |
download | wallabag-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/CoreBundle/Entity')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index bf8db5ab..5cf84f03 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -9,6 +9,7 @@ use JMS\Serializer\Annotation\Groups; | |||
9 | use JMS\Serializer\Annotation\XmlRoot; | 9 | use JMS\Serializer\Annotation\XmlRoot; |
10 | use Symfony\Component\Validator\Constraints as Assert; | 10 | use Symfony\Component\Validator\Constraints as Assert; |
11 | use Wallabag\UserBundle\Entity\User; | 11 | use Wallabag\UserBundle\Entity\User; |
12 | use Wallabag\CommentBundle\Entity\Comment; | ||
12 | 13 | ||
13 | /** | 14 | /** |
14 | * Entry. | 15 | * Entry. |
@@ -98,11 +99,10 @@ class Entry | |||
98 | private $updatedAt; | 99 | private $updatedAt; |
99 | 100 | ||
100 | /** | 101 | /** |
101 | * @var string | 102 | * @ORM\OneToMany(targetEntity="Wallabag\CommentBundle\Entity\Comment", mappedBy="entry", cascade={"persist", "remove"}) |
102 | * | 103 | * @ORM\JoinTable |
103 | * @ORM\Column(name="comments", type="text", nullable=true) | ||
104 | * | 104 | * |
105 | * @Groups({"export_all"}) | 105 | * @Groups({"entries_for_user", "export_all"}) |
106 | */ | 106 | */ |
107 | private $comments; | 107 | private $comments; |
108 | 108 | ||
@@ -366,7 +366,7 @@ class Entry | |||
366 | } | 366 | } |
367 | 367 | ||
368 | /** | 368 | /** |
369 | * @return string | 369 | * @return ArrayCollection<Comment> |
370 | */ | 370 | */ |
371 | public function getComments() | 371 | public function getComments() |
372 | { | 372 | { |
@@ -374,11 +374,11 @@ class Entry | |||
374 | } | 374 | } |
375 | 375 | ||
376 | /** | 376 | /** |
377 | * @param string $comments | 377 | * @param Comment $comment |
378 | */ | 378 | */ |
379 | public function setComments($comments) | 379 | public function setComment(Comment $comment) |
380 | { | 380 | { |
381 | $this->comments = $comments; | 381 | $this->comments[] = $comment; |
382 | } | 382 | } |
383 | 383 | ||
384 | /** | 384 | /** |