1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-10 18:51:02 +00:00

store estimated reading time / filters on reading time

This commit is contained in:
Nicolas Lœuillet 2015-08-07 22:20:30 +02:00
parent fedaf00537
commit 2686457448
20 changed files with 433 additions and 279 deletions

View file

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