Completed
Push — master ( 7a9a35...ef55ea )
by Adam
06:26
created

ProducerCollectionTranslation::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 *
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 *
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Bundle\CatalogBundle\Entity;
14
15
use Knp\DoctrineBehaviors\Model\Translatable\Translation;
16
use WellCommerce\Bundle\AppBundle\Entity\Meta;
17
use WellCommerce\Bundle\CatalogBundle\Entity\ProducerCollectionRoute;
18
use WellCommerce\Bundle\CoreBundle\Entity\LocaleAwareInterface;
19
use WellCommerce\Bundle\CoreBundle\Entity\RoutableSubjectInterface;
20
use WellCommerce\Bundle\CoreBundle\Entity\RoutableTrait;
21
use WellCommerce\Bundle\CoreBundle\Entity\Route;
22
23
/**
24
 * Class ProducerCollectionTranslation
25
 *
26
 * @author Rafał Martonik <[email protected]>
27
 */
28
class ProducerCollectionTranslation implements RoutableSubjectInterface, LocaleAwareInterface
29
{
30
    use Translation;
31
    use RoutableTrait;
32
    
33
    protected $name = '';
34
    protected $meta;
35
    
36
    public function __construct()
37
    {
38
        $this->meta = new Meta();
39
    }
40
    
41
    public function getName(): string
42
    {
43
        return $this->name;
44
    }
45
    
46
    public function setName(string $name)
47
    {
48
        $this->name = $name;
49
    }
50
    
51
    public function getMeta(): Meta
52
    {
53
        return $this->meta;
54
    }
55
    
56
    public function setMeta(Meta $meta)
57
    {
58
        $this->meta = $meta;
59
    }
60
    
61
    public function getRouteEntity(): Route
62
    {
63
        return new ProducerCollectionRoute();
64
    }
65
}
66