/**
* @var bool
*
+ * @Exclude
+ *
* @ORM\Column(name="is_archived", type="boolean")
*
* @Groups({"entries_for_user", "export_all"})
/**
* @var bool
*
+ * @Exclude
+ *
* @ORM\Column(name="is_starred", type="boolean")
*
* @Groups({"entries_for_user", "export_all"})
/*
* @param User $user
*/
- public function __construct(\Wallabag\UserBundle\Entity\User $user)
+ public function __construct(User $user)
{
$this->user = $user;
$this->tags = new ArrayCollection();
return $this->isArchived;
}
+ /**
+ * @VirtualProperty
+ * @SerializedName("is_archived")
+ * @Groups({"entries_for_user", "export_all"})
+ */
+ public function is_Archived()
+ {
+ return (int) $this->isArchived();
+ }
+
public function toggleArchive()
{
$this->isArchived = $this->isArchived() ^ 1;
return $this->isStarred;
}
+ /**
+ * @VirtualProperty
+ * @SerializedName("is_starred")
+ * @Groups({"entries_for_user", "export_all"})
+ */
+ public function is_Starred()
+ {
+ return (int) $this->isStarred();
+ }
+
public function toggleStar()
{
$this->isStarred = $this->isStarred() ^ 1;