X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FEntry.php;h=7108889e00236d9f9c8744bb5e7f03c01192be2e;hb=d4ebe5c5dcf581416ab76136908cafbde78f63bf;hp=7d2d2027f1bbf43478db1887339a2ed8a38cef56;hpb=c2257428b2188fc709c76ec8f531287888de9741;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 7d2d2027..7108889e 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -7,7 +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; +use Wallabag\CoreBundle\Tools\Utils; /** * Entry. @@ -94,6 +94,13 @@ class Entry */ private $mimetype; + /** + * @var string + * + * @ORM\Column(name="language", type="text", nullable=true) + */ + private $language; + /** * @var int * @@ -108,6 +115,13 @@ class Entry */ private $domainName; + /** + * @var string + * + * @ORM\Column(name="preview_picture", type="text", nullable=true) + */ + private $previewPicture; + /** * @var bool * @@ -265,7 +279,7 @@ class Entry public function setContent($content) { $this->content = $content; - $this->readingTime = Tools::getReadingTime($content); + $this->readingTime = Utils::getReadingTime($content); $this->domainName = parse_url($this->url, PHP_URL_HOST); return $this; @@ -419,4 +433,52 @@ class Entry { $this->tags->removeElement($tag); } + + /** + * Set previewPicture. + * + * @param string $previewPicture + * + * @return Entry + */ + public function setPreviewPicture($previewPicture) + { + $this->previewPicture = $previewPicture; + + return $this; + } + + /** + * Get previewPicture. + * + * @return string + */ + public function getPreviewPicture() + { + return $this->previewPicture; + } + + /** + * Set language. + * + * @param string $language + * + * @return Entry + */ + public function setLanguage($language) + { + $this->language = $language; + + return $this; + } + + /** + * Get language. + * + * @return string + */ + public function getLanguage() + { + return $this->language; + } }