use Symfony\Component\Validator\Constraints as Assert;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\XmlRoot;
-use Wallabag\CoreBundle\Tools\Utils;
+use Wallabag\UserBundle\Entity\User;
/**
* Entry.
*/
private $mimetype;
+ /**
+ * @var string
+ *
+ * @ORM\Column(name="language", type="text", nullable=true)
+ */
+ private $language;
+
/**
* @var int
*
private $isPublic;
/**
- * @ORM\ManyToOne(targetEntity="User", inversedBy="entries")
+ * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="entries")
*/
private $user;
/*
* @param User $user
*/
- public function __construct(User $user)
+ public function __construct(\Wallabag\UserBundle\Entity\User $user)
{
$this->user = $user;
$this->tags = new ArrayCollection();
public function setContent($content)
{
$this->content = $content;
- $this->readingTime = Utils::getReadingTime($content);
- $this->domainName = parse_url($this->url, PHP_URL_HOST);
return $this;
}
{
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;
+ }
}