forked from wallabag/wallabag
use integers for archived/starred status
This commit is contained in:
@ -59,6 +59,8 @@ class Entry
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @Exclude
|
||||
*
|
||||
* @ORM\Column(name="is_archived", type="boolean")
|
||||
*
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
@ -68,6 +70,8 @@ class Entry
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
* @Exclude
|
||||
*
|
||||
* @ORM\Column(name="is_starred", type="boolean")
|
||||
*
|
||||
* @Groups({"entries_for_user", "export_all"})
|
||||
@ -271,6 +275,16 @@ class Entry
|
||||
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;
|
||||
@ -302,6 +316,16 @@ class Entry
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user