Completed
Push — master ( 5d51b4...87fdd9 )
by Paul
10s
created

ViewTranslationLegacy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Victoire\Bundle\I18nBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation;
7
8
/**
9
 * @ORM\Entity
10
 * @ORM\Table(name="vic_view_translations_legacy",
11
 *     uniqueConstraints={@ORM\UniqueConstraint(name="lookup_unique_idx", columns={
12
 *         "locale", "object_id", "field"
13
 *     })}
14
 * )
15
 */
16
class ViewTranslationLegacy extends AbstractPersonalTranslation
17
{
18
    /**
19
     * Convenient constructor.
20
     *
21
     * @param string $locale
22
     * @param string $field
23
     * @param string $value
24
     */
25
    public function __construct($locale = null, $field = null, $value = null)
26
    {
27
        $this->setLocale($locale);
28
        $this->setField($field);
29
        $this->setContent($value);
30
    }
31
32
    /**
33
     * @ORM\ManyToOne(targetEntity="Victoire\Bundle\CoreBundle\Entity\View", inversedBy="translations")
34
     * @ORM\JoinColumn(name="object_id", referencedColumnName="id", onDelete="CASCADE")
35
     */
36
    protected $object;
37
}
38