diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-09-20 22:37:27 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-09-22 20:52:13 +0200 |
commit | 98f0929f168a336079456f65b6ca41e84b22efff (patch) | |
tree | 64d354d41c4188d4544c1841607225aad8e7233c /src/Wallabag/CoreBundle/Entity | |
parent | db96045a0ae96cfe67bc98d49596fde31c9124fc (diff) | |
download | wallabag-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.php | 31 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/User.php | 5 |
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; | |||
7 | use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; | 7 | use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
8 | use Symfony\Component\Security\Core\User\UserInterface; | 8 | use Symfony\Component\Security\Core\User\UserInterface; |
9 | use Symfony\Component\Security\Core\User\AdvancedUserInterface; | 9 | use Symfony\Component\Security\Core\User\AdvancedUserInterface; |
10 | use Symfony\Component\Validator\Constraints as Assert; | ||
11 | use JMS\Serializer\Annotation\ExclusionPolicy; | 10 | use JMS\Serializer\Annotation\ExclusionPolicy; |
12 | use JMS\Serializer\Annotation\Expose; | 11 | use JMS\Serializer\Annotation\Expose; |
13 | use FOS\UserBundle\Model\User as BaseUser; | 12 | use 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 | /** |