diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-02-24 11:34:36 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2017-05-30 11:47:39 +0200 |
commit | 61351218f90df455c6edcc530bfc746d60b43a12 (patch) | |
tree | abb1945e9f9c648ac686eb67bb1386eb175f72d3 /src/Wallabag/CoreBundle/Repository | |
parent | d181bd728565454ec53d960f321ed0a4c3bf26c8 (diff) | |
download | wallabag-61351218f90df455c6edcc530bfc746d60b43a12.tar.gz wallabag-61351218f90df455c6edcc530bfc746d60b43a12.tar.zst wallabag-61351218f90df455c6edcc530bfc746d60b43a12.zip |
Save changes
PHP CS
Fixed Events on changes
Renamed field
First draft for migration (create table Change)
Added setter for tag in EntryTaggedEvent
Fixed migration for Change table
Added API route for entry history
Removed deletion history
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/ChangeRepository.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/ChangeRepository.php b/src/Wallabag/CoreBundle/Repository/ChangeRepository.php new file mode 100644 index 00000000..18d015a7 --- /dev/null +++ b/src/Wallabag/CoreBundle/Repository/ChangeRepository.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Repository; | ||
4 | |||
5 | use Doctrine\ORM\EntityRepository; | ||
6 | |||
7 | class ChangeRepository extends EntityRepository | ||
8 | { | ||
9 | /** | ||
10 | * Used only in test case to get a tag for our entry. | ||
11 | * | ||
12 | * @param int $timestamp | ||
13 | * | ||
14 | * @return Tag | ||
15 | */ | ||
16 | public function findChangesSinceDate($timestamp) | ||
17 | { | ||
18 | $date = new \DateTime(); | ||
19 | $date->setTimestamp($timestamp); | ||
20 | |||
21 | return $this->createQueryBuilder('c') | ||
22 | ->where('c.createdAt >= :timestamp')->setParameter('timestamp', $date) | ||
23 | ->getQuery() | ||
24 | ->getResult(); | ||
25 | } | ||
26 | } | ||