diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-07 22:20:30 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-12 09:01:29 +0200 |
commit | 2686457448372543fdf4f1fc54c4fd20f0f02c2c (patch) | |
tree | 485eeecc3bd3db3613d47de25662d5c9163e4afe /src/Wallabag/CoreBundle/Entity | |
parent | fedaf005377e6d62ff0986f7f54afef3287a6451 (diff) | |
download | wallabag-2686457448372543fdf4f1fc54c4fd20f0f02c2c.tar.gz wallabag-2686457448372543fdf4f1fc54c4fd20f0f02c2c.tar.zst wallabag-2686457448372543fdf4f1fc54c4fd20f0f02c2c.zip |
store estimated reading time / filters on reading time
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f139bbac..9aebc55b 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -7,6 +7,7 @@ use Doctrine\ORM\Mapping as ORM; | |||
7 | use Symfony\Component\Validator\Constraints as Assert; | 7 | use Symfony\Component\Validator\Constraints as Assert; |
8 | use Hateoas\Configuration\Annotation as Hateoas; | 8 | use Hateoas\Configuration\Annotation as Hateoas; |
9 | use JMS\Serializer\Annotation\XmlRoot; | 9 | use JMS\Serializer\Annotation\XmlRoot; |
10 | use Wallabag\CoreBundle\Helper\Tools; | ||
10 | 11 | ||
11 | /** | 12 | /** |
12 | * Entry. | 13 | * Entry. |
@@ -96,7 +97,7 @@ class Entry | |||
96 | /** | 97 | /** |
97 | * @var int | 98 | * @var int |
98 | * | 99 | * |
99 | * @ORM\Column(name="reading_type", type="integer", nullable=true) | 100 | * @ORM\Column(name="reading_time", type="integer", nullable=true) |
100 | */ | 101 | */ |
101 | private $readingTime; | 102 | private $readingTime; |
102 | 103 | ||
@@ -264,6 +265,7 @@ class Entry | |||
264 | public function setContent($content) | 265 | public function setContent($content) |
265 | { | 266 | { |
266 | $this->content = $content; | 267 | $this->content = $content; |
268 | $this->readingTime = Tools::getReadingTime($content); | ||
267 | 269 | ||
268 | return $this; | 270 | return $this; |
269 | } | 271 | } |