aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php4
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;
7use Symfony\Component\Validator\Constraints as Assert; 7use Symfony\Component\Validator\Constraints as Assert;
8use Hateoas\Configuration\Annotation as Hateoas; 8use Hateoas\Configuration\Annotation as Hateoas;
9use JMS\Serializer\Annotation\XmlRoot; 9use JMS\Serializer\Annotation\XmlRoot;
10use 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 }