From 2686457448372543fdf4f1fc54c4fd20f0f02c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 7 Aug 2015 22:20:30 +0200 Subject: store estimated reading time / filters on reading time --- src/Wallabag/CoreBundle/Entity/Entry.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Entity') 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; use Symfony\Component\Validator\Constraints as Assert; use Hateoas\Configuration\Annotation as Hateoas; use JMS\Serializer\Annotation\XmlRoot; +use Wallabag\CoreBundle\Helper\Tools; /** * Entry. @@ -96,7 +97,7 @@ class Entry /** * @var int * - * @ORM\Column(name="reading_type", type="integer", nullable=true) + * @ORM\Column(name="reading_time", type="integer", nullable=true) */ private $readingTime; @@ -264,6 +265,7 @@ class Entry public function setContent($content) { $this->content = $content; + $this->readingTime = Tools::getReadingTime($content); return $this; } -- cgit v1.2.3