From 34be2d5de44ade2a78be73decc0b90a2c1bca720 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 26 Jun 2019 22:31:47 +0200 Subject: Add ability to import/export tagging rules - Add missing translations - Add some tests - Add `/api/taggingrule/export` API endpoint - Add baggy theme - Add error message when importing tagging rules failed - Also fix all translations (I think we are good now) --- src/Wallabag/CoreBundle/Entity/TaggingRule.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Wallabag/CoreBundle/Entity/TaggingRule.php') diff --git a/src/Wallabag/CoreBundle/Entity/TaggingRule.php b/src/Wallabag/CoreBundle/Entity/TaggingRule.php index c1be3165..eac53fa3 100644 --- a/src/Wallabag/CoreBundle/Entity/TaggingRule.php +++ b/src/Wallabag/CoreBundle/Entity/TaggingRule.php @@ -3,12 +3,16 @@ namespace Wallabag\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; +use JMS\Serializer\Annotation\Exclude; +use JMS\Serializer\Annotation\Groups; +use JMS\Serializer\Annotation\XmlRoot; use Symfony\Bridge\RulerZ\Validator\Constraints as RulerZAssert; use Symfony\Component\Validator\Constraints as Assert; /** * Tagging rule. * + * @XmlRoot("tagging_rule") * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TaggingRuleRepository") * @ORM\Table(name="`tagging_rule`") * @ORM\Entity @@ -34,6 +38,8 @@ class TaggingRule * allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or", "matches", "notmatches"} * ) * @ORM\Column(name="rule", type="string", nullable=false) + * + * @Groups({"export_tagging_rule"}) */ private $rule; @@ -42,10 +48,14 @@ class TaggingRule * * @Assert\NotBlank() * @ORM\Column(name="tags", type="simple_array", nullable=false) + * + * @Groups({"export_tagging_rule"}) */ private $tags = []; /** + * @Exclude + * * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", inversedBy="taggingRules") */ private $config; -- cgit v1.2.3