mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-11 17:51:02 +00:00
Implement tagging rules reset
Adding tagging rule reset to templates Adding messages to tagging rule reset Adding translation for Traditional and Simplified Chinese
This commit is contained in:
parent
f78353910f
commit
c65850050d
6 changed files with 34 additions and 2 deletions
|
@ -12,4 +12,18 @@ class TaggingRuleRepository extends ServiceEntityRepository
|
|||
{
|
||||
parent::__construct($registry, TaggingRule::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all tagging rule for a config.
|
||||
* Used when a user wants to reset.
|
||||
*
|
||||
* @param int $configId
|
||||
*/
|
||||
public function removeAllTaggingRules($configId)
|
||||
{
|
||||
$this->getEntityManager()
|
||||
->createQuery('DELETE FROM Wallabag\Entity\TaggingRule tr WHERE tr.config = :configId')
|
||||
->setParameter(':configId', $configId)
|
||||
->execute();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue