ArticlePersonalTranslatable::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Sonata\TranslationBundle\Tests\Fixtures\Traits\ORM;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\ORM\Mapping as ORM;
7
use Gedmo\Mapping\Annotation as Gedmo;
8
use Sonata\TranslationBundle\Traits\Gedmo\PersonalTranslatableTrait;
9
10
/**
11
 * @Gedmo\TranslationEntity(class="Sonata\TranslationBundle\Tests\Fixtures\Traits\ORM\ArticlePersonalTranslation")
12
 * @ORM\Table(name="article")
13
 * @ORM\Entity
14
 */
15
class ArticlePersonalTranslatable
16
{
17
    use PersonalTranslatableTrait;
18
19
    /**
20
     * @ORM\Id
21
     * @ORM\GeneratedValue
22
     * @ORM\Column(type="integer")
23
     */
24
    private $id;
25
26
    /**
27
     * @Gedmo\Translatable
28
     * @ORM\Column(length=128)
29
     */
30
    private $title;
31
32
    /**
33
     * @var ArrayCollection
34
     *
35
     * @ORM\OneToMany(
36
     *     targetEntity="Sonata\TranslationBundle\Tests\Fixtures\Traits\ORM\ArticlePersonalTranslation",
37
     *     mappedBy="object",
38
     *     cascade={"persist", "remove"}
39
     * )
40
     */
41
    protected $translations;
42
43
    public function __construct()
44
    {
45
        $this->translations = new ArrayCollection();
46
    }
47
48
    public function getId()
49
    {
50
        return $this->id;
51
    }
52
53
    public function setTitle($title): void
54
    {
55
        $this->title = $title;
56
    }
57
58
    public function getTitle()
59
    {
60
        return $this->title;
61
    }
62
}
63