1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-10 19:32:07 +00:00

Comment work with annotator v2

- add missing annotator.js file and fix typo
- edit & delete routes, started tests
- basic tests
This commit is contained in:
Thomas Citharel 2016-02-07 16:52:59 +01:00 committed by Jeremy Benoist
parent d3f1a9dc1a
commit f38e03dc02
20 changed files with 828 additions and 9 deletions

View file

@ -9,6 +9,7 @@ use JMS\Serializer\Annotation\Groups;
use JMS\Serializer\Annotation\XmlRoot;
use Symfony\Component\Validator\Constraints as Assert;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CommentBundle\Entity\Comment;
/**
* Entry.
@ -98,11 +99,10 @@ class Entry
private $updatedAt;
/**
* @var string
* @ORM\OneToMany(targetEntity="Wallabag\CommentBundle\Entity\Comment", mappedBy="entry", cascade={"persist", "remove"})
* @ORM\JoinTable
*
* @ORM\Column(name="comments", type="text", nullable=true)
*
* @Groups({"export_all"})
* @Groups({"entries_for_user", "export_all"})
*/
private $comments;
@ -366,7 +366,7 @@ class Entry
}
/**
* @return string
* @return ArrayCollection<Comment>
*/
public function getComments()
{
@ -374,11 +374,11 @@ class Entry
}
/**
* @param string $comments
* @param Comment $comment
*/
public function setComments($comments)
public function setComment(Comment $comment)
{
$this->comments = $comments;
$this->comments[] = $comment;
}
/**