aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-09-20 22:37:27 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-09-22 20:52:13 +0200
commit98f0929f168a336079456f65b6ca41e84b22efff (patch)
tree64d354d41c4188d4544c1841607225aad8e7233c /src/Wallabag/CoreBundle/Entity
parentdb96045a0ae96cfe67bc98d49596fde31c9124fc (diff)
downloadwallabag-98f0929f168a336079456f65b6ca41e84b22efff.tar.gz
wallabag-98f0929f168a336079456f65b6ca41e84b22efff.tar.zst
wallabag-98f0929f168a336079456f65b6ca41e84b22efff.zip
Handle entry in language
Fix #1333
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php31
-rw-r--r--src/Wallabag/CoreBundle/Entity/User.php5
2 files changed, 33 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index e684c9b1..7108889e 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -95,6 +95,13 @@ class Entry
95 private $mimetype; 95 private $mimetype;
96 96
97 /** 97 /**
98 * @var string
99 *
100 * @ORM\Column(name="language", type="text", nullable=true)
101 */
102 private $language;
103
104 /**
98 * @var int 105 * @var int
99 * 106 *
100 * @ORM\Column(name="reading_time", type="integer", nullable=true) 107 * @ORM\Column(name="reading_time", type="integer", nullable=true)
@@ -450,4 +457,28 @@ class Entry
450 { 457 {
451 return $this->previewPicture; 458 return $this->previewPicture;
452 } 459 }
460
461 /**
462 * Set language.
463 *
464 * @param string $language
465 *
466 * @return Entry
467 */
468 public function setLanguage($language)
469 {
470 $this->language = $language;
471
472 return $this;
473 }
474
475 /**
476 * Get language.
477 *
478 * @return string
479 */
480 public function getLanguage()
481 {
482 return $this->language;
483 }
453} 484}
diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php
index eeae331e..a6002352 100644
--- a/src/Wallabag/CoreBundle/Entity/User.php
+++ b/src/Wallabag/CoreBundle/Entity/User.php
@@ -7,7 +7,6 @@ use Doctrine\ORM\Mapping as ORM;
7use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; 7use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
8use Symfony\Component\Security\Core\User\UserInterface; 8use Symfony\Component\Security\Core\User\UserInterface;
9use Symfony\Component\Security\Core\User\AdvancedUserInterface; 9use Symfony\Component\Security\Core\User\AdvancedUserInterface;
10use Symfony\Component\Validator\Constraints as Assert;
11use JMS\Serializer\Annotation\ExclusionPolicy; 10use JMS\Serializer\Annotation\ExclusionPolicy;
12use JMS\Serializer\Annotation\Expose; 11use JMS\Serializer\Annotation\Expose;
13use FOS\UserBundle\Model\User as BaseUser; 12use FOS\UserBundle\Model\User as BaseUser;
@@ -74,8 +73,8 @@ class User extends BaseUser implements AdvancedUserInterface, \Serializable
74 public function __construct() 73 public function __construct()
75 { 74 {
76 parent::__construct(); 75 parent::__construct();
77 $this->entries = new ArrayCollection(); 76 $this->entries = new ArrayCollection();
78 $this->tags = new ArrayCollection(); 77 $this->tags = new ArrayCollection();
79 } 78 }
80 79
81 /** 80 /**