1
0
Fork 0
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:
Kevin Jiang 2024-07-07 01:04:28 +12:00 committed by Sicong Jiang
parent f78353910f
commit c65850050d
6 changed files with 34 additions and 2 deletions

View file

@ -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();
}
}