Handle entry in language

Fix #1333
This commit is contained in:
Jeremy Benoist
2015-09-20 22:37:27 +02:00
parent db96045a0a
commit 98f0929f16
4 changed files with 56 additions and 5 deletions

View File

@ -94,6 +94,13 @@ class Entry
*/
private $mimetype;
/**
* @var string
*
* @ORM\Column(name="language", type="text", nullable=true)
*/
private $language;
/**
* @var int
*
@ -450,4 +457,28 @@ class Entry
{
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;
}
}

View File

@ -7,7 +7,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
use FOS\UserBundle\Model\User as BaseUser;
@ -74,8 +73,8 @@ class User extends BaseUser implements AdvancedUserInterface, \Serializable
public function __construct()
{
parent::__construct();
$this->entries = new ArrayCollection();
$this->tags = new ArrayCollection();
$this->entries = new ArrayCollection();
$this->tags = new ArrayCollection();
}
/**