Completed
Push — master ( 80b11c...96296f )
by
unknown
01:31 queued 10s
created

ArticleTranslation::setTitle()   A

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 1
1
<?php
2
3
namespace Sonata\TranslationBundle\Tests\Fixtures\Traits\ORM\Knplabs;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Knp\DoctrineBehaviors\Model\Translatable\Translation;
7
8
/**
9
 * @ORM\Table(name="article_translation")
10
 * @ORM\Entity
11
 */
12
final class ArticleTranslation
13
{
14
    use Translation;
15
16
    /**
17
     * @ORM\Id
18
     * @ORM\GeneratedValue
19
     * @ORM\Column(type="integer")
20
     */
21
    protected $id;
22
23
    /**
24
     * @var Article
25
     *
26
     * @ORM\ManyToOne(
27
     *     targetEntity="Sonata\TranslationBundle\Tests\Fixtures\Traits\ORM\Knplabs\ArticleTranslation",
28
     *     inversedBy="translations",
29
     *     cascade={"persist", "merge"}
30
     * )
31
     * @ORM\JoinColumn(name="translatable_id", referencedColumnName="id", onDelete="CASCADE")
32
     */
33
    protected $translatable;
34
35
    /**
36
     * @ORM\Column(length=128)
37
     */
38
    protected $title;
39
40
    public function getTitle()
41
    {
42
        return $this->title;
43
    }
44
45
    public function setTitle($title)
46
    {
47
        $this->title = $title;
48
    }
49
50
    public static function getTranslatableEntityClass(): string
51
    {
52
        return Article::class;
53
    }
54
}
55