Completed
Pull Request — master (#424)
by Jonas
03:35
created

RemoteCategory::setLocalCategoryId()   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 1
1
<?php
2
/**
3
 * (c) shopware AG <[email protected]>
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Shopware\CustomModels\Connect;
9
10
use Doctrine\ORM\Mapping as ORM;
11
use Shopware\Components\Model\ModelEntity;
12
13
/**
14
 * Describes Shopware Connect categories
15
 *
16
 * @ORM\Table(name="s_plugin_connect_categories")
17
 * @ORM\Entity(repositoryClass="RemoteCategoryRepository")
18
 */
19
class RemoteCategory extends ModelEntity
20
{
21
    /**
22
     * @var int
23
     * @ORM\Id
24
     * @ORM\GeneratedValue(strategy="IDENTITY")
25
     * @ORM\Column(name="id", type="integer", nullable=false)
26
     */
27
    protected $id;
28
29
    /**
30
     * @var string
31
     *
32
     * @ORM\Column(name="category_key", type="string", length=255, nullable=false)
33
     */
34
    protected $categoryKey;
35
36
    /**
37
     * @var string
38
     *
39
     * @ORM\Column(name="label", type="string", length=255, nullable=false)
40
     */
41
    protected $label;
42
43
    /**
44
     * @var int
45
     *
46
     * @ORM\Column(name="shop_id", type="integer", nullable=true)
47
     */
48
    protected $shopId;
49
50
    /**
51
     * @deprecated
52
     */
53
    protected $localCategoryId;
54
55
    /**
56
     * @deprecated
57
     */
58
    protected $localCategory;
59
60
    /**
61
     * @var \Doctrine\Common\Collections\ArrayCollection
62
     *
63
     * @ORM\OneToMany(targetEntity="Shopware\CustomModels\Connect\RemoteToLocalCategory", mappedBy="remoteCategory")
64
     */
65
    protected $remoteToLocalCategories;
66
67
    public function __construct()
68
    {
69
        $this->remoteToLocalCategories = new \Doctrine\Common\Collections\ArrayCollection();
70
    }
71
72
    /**
73
     * @return int
74
     */
75
    public function getId()
76
    {
77
        return $this->id;
78
    }
79
80
    /**
81
     * @return string
82
     */
83
    public function getCategoryKey()
84
    {
85
        return $this->categoryKey;
86
    }
87
88
    /**
89
     * @param string $categoryKey
90
     */
91
    public function setCategoryKey($categoryKey)
92
    {
93
        $this->categoryKey = $categoryKey;
94
    }
95
96
    /**
97
     * @return string
98
     */
99
    public function getLabel()
100
    {
101
        return $this->label;
102
    }
103
104
    /**
105
     * @param string $label
106
     */
107
    public function setLabel($label)
108
    {
109
        $this->label = $label;
110
    }
111
112
    /**
113
     * @return \Doctrine\Common\Collections\ArrayCollection
114
     */
115
    public function getRemoteToLocalCategories()
116
    {
117
        return $this->remoteToLocalCategories;
118
    }
119
120
    /**
121
     * @param \Doctrine\Common\Collections\ArrayCollection $remoteToLocalCategories
122
     */
123
    public function setRemoteToLocalCategories($remoteToLocalCategories)
124
    {
125
        $this->remoteToLocalCategories = $remoteToLocalCategories;
126
    }
127
128
    /**
129
     * @deprecated
130
     */
131
    public function getLocalCategoryId()
132
    {
133
        return $this->localCategoryId;
0 ignored issues
show
Deprecated Code introduced by
The property Shopware\CustomModels\Co...egory::$localCategoryId has been deprecated.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
134
    }
135
136
    /**
137
     * @param int $id
138
     * @deprecated
139
     */
140
    public function setLocalCategoryId($id)
141
    {
142
        $this->localCategoryId = $id;
0 ignored issues
show
Deprecated Code introduced by
The property Shopware\CustomModels\Co...egory::$localCategoryId has been deprecated.

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
143
    }
144
145
    /**
146
     * @return int
147
     */
148
    public function getShopId()
149
    {
150
        return $this->shopId;
151
    }
152
153
    /**
154
     * @param int $shopId
155
     */
156
    public function setShopId($shopId)
157
    {
158
        $this->shopId = $shopId;
159
    }
160
}
161