X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FEntry.php;h=4fd74001b3efc076388f183fe794fea6180fba04;hb=16dabc326311f084d671be188c7941bbb3c341c9;hp=b1998ab64df58355ffaedcd836aaf917407d3b4e;hpb=4346a86068781f4acdeb574d7e2af08b77b58ea7;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index b1998ab6..4fd74001 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\UserBundle\Entity\User; /** * Entry. @@ -93,10 +94,17 @@ class Entry */ private $mimetype; + /** + * @var string + * + * @ORM\Column(name="language", type="text", nullable=true) + */ + private $language; + /** * @var int * - * @ORM\Column(name="reading_type", type="integer", nullable=true) + * @ORM\Column(name="reading_time", type="integer", nullable=true) */ private $readingTime; @@ -107,6 +115,13 @@ class Entry */ private $domainName; + /** + * @var string + * + * @ORM\Column(name="preview_picture", type="text", nullable=true) + */ + private $previewPicture; + /** * @var bool * @@ -115,7 +130,7 @@ class Entry private $isPublic; /** - * @ORM\ManyToOne(targetEntity="User", inversedBy="entries") + * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="entries") */ private $user; @@ -128,7 +143,7 @@ class Entry /* * @param User $user */ - public function __construct(User $user) + public function __construct(\Wallabag\UserBundle\Entity\User $user) { $this->user = $user; $this->tags = new ArrayCollection(); @@ -390,7 +405,7 @@ class Entry /** * @param bool $isPublic */ - public function setPublic($isPublic) + public function setIsPublic($isPublic) { $this->isPublic = $isPublic; } @@ -416,4 +431,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; + } }