mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-06 17:41:01 +00:00
Migrate to JMS attributes
This commit is contained in:
parent
a1440dffda
commit
a766826a69
8 changed files with 96 additions and 183 deletions
|
@ -12,11 +12,10 @@ use Wallabag\Repository\TaggingRuleRepository;
|
|||
|
||||
/**
|
||||
* Tagging rule.
|
||||
*
|
||||
* @XmlRoot("tagging_rule")
|
||||
*/
|
||||
#[ORM\Table(name: '`tagging_rule`')]
|
||||
#[ORM\Entity(repositoryClass: TaggingRuleRepository::class)]
|
||||
#[XmlRoot('tagging_rule')]
|
||||
class TaggingRule implements RuleInterface
|
||||
{
|
||||
/**
|
||||
|
@ -34,27 +33,23 @@ class TaggingRule implements RuleInterface
|
|||
* allowed_variables={"title", "url", "isArchived", "isStarred", "content", "language", "mimetype", "readingTime", "domainName"},
|
||||
* allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or", "matches", "notmatches"}
|
||||
* )
|
||||
*
|
||||
* @Groups({"export_tagging_rule"})
|
||||
*/
|
||||
#[ORM\Column(name: 'rule', type: 'string', nullable: false)]
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\Length(max: 255)]
|
||||
#[Groups(['export_tagging_rule'])]
|
||||
private $rule;
|
||||
|
||||
/**
|
||||
* @var array<string>
|
||||
*
|
||||
* @Groups({"export_tagging_rule"})
|
||||
*/
|
||||
#[ORM\Column(name: 'tags', type: 'simple_array', nullable: false)]
|
||||
#[Assert\NotBlank]
|
||||
#[Groups(['export_tagging_rule'])]
|
||||
private $tags = [];
|
||||
|
||||
/**
|
||||
* @Exclude
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: Config::class, inversedBy: 'taggingRules')]
|
||||
#[Exclude]
|
||||
private $config;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue