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\AppBundle\Entity; |
14
|
|
|
|
15
|
|
|
use Knp\DoctrineBehaviors\Model\Blameable\Blameable; |
16
|
|
|
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable; |
17
|
|
|
use Knp\DoctrineBehaviors\Model\Translatable\Translatable; |
18
|
|
|
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Identifiable; |
19
|
|
|
use WellCommerce\Bundle\CoreBundle\Entity\EntityInterface; |
20
|
|
|
use WellCommerce\Bundle\CoreBundle\Entity\MailerConfiguration; |
21
|
|
|
use WellCommerce\Extra\AppBundle\Entity\ShopExtraTrait; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Class Shop |
25
|
|
|
* |
26
|
|
|
* @author Adam Piotrowski <[email protected]> |
27
|
|
|
*/ |
28
|
|
|
class Shop implements EntityInterface |
29
|
|
|
{ |
30
|
|
|
use Identifiable; |
31
|
|
|
use Timestampable; |
32
|
|
|
use Blameable; |
33
|
|
|
use Translatable; |
34
|
|
|
use ShopExtraTrait; |
35
|
|
|
|
36
|
|
|
protected $name = ''; |
37
|
|
|
protected $url = ''; |
38
|
|
|
protected $defaultCountry = ''; |
39
|
|
|
protected $defaultCurrency = ''; |
40
|
|
|
protected $logo = ''; |
41
|
|
|
protected $enableClient = true; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var MinimumOrderAmount |
45
|
|
|
*/ |
46
|
|
|
protected $minimumOrderAmount; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var MailerConfiguration |
50
|
|
|
*/ |
51
|
|
|
protected $mailerConfiguration; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var Company |
55
|
|
|
*/ |
56
|
|
|
protected $company; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @var ClientGroup |
60
|
|
|
*/ |
61
|
|
|
protected $clientGroup; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @var Theme |
65
|
|
|
*/ |
66
|
|
|
protected $theme; |
67
|
|
|
|
68
|
|
|
public function __construct() |
69
|
|
|
{ |
70
|
|
|
$this->mailerConfiguration = new MailerConfiguration(); |
71
|
|
|
$this->minimumOrderAmount = new MinimumOrderAmount(); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
public function getName(): string |
75
|
|
|
{ |
76
|
|
|
return $this->name; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function setName(string $name) |
80
|
|
|
{ |
81
|
|
|
$this->name = $name; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
public function getCompany() |
85
|
|
|
{ |
86
|
|
|
return $this->company; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
public function setCompany(Company $company = null) |
90
|
|
|
{ |
91
|
|
|
$this->company = $company; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
public function getUrl(): string |
95
|
|
|
{ |
96
|
|
|
return $this->url; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
public function setUrl(string $url) |
100
|
|
|
{ |
101
|
|
|
$this->url = $url; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
public function getDefaultCountry(): string |
105
|
|
|
{ |
106
|
|
|
return $this->defaultCountry; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
public function setDefaultCountry(string $defaultCountry) |
110
|
|
|
{ |
111
|
|
|
$this->defaultCountry = $defaultCountry; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
public function getDefaultCurrency(): string |
115
|
|
|
{ |
116
|
|
|
return $this->defaultCurrency; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
public function setDefaultCurrency(string $defaultCurrency) |
120
|
|
|
{ |
121
|
|
|
$this->defaultCurrency = $defaultCurrency; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
public function setMailerConfiguration(MailerConfiguration $configuration) |
125
|
|
|
{ |
126
|
|
|
$this->mailerConfiguration = $configuration; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
public function getMailerConfiguration(): MailerConfiguration |
130
|
|
|
{ |
131
|
|
|
return $this->mailerConfiguration; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
public function getClientGroup() |
135
|
|
|
{ |
136
|
|
|
return $this->clientGroup; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
public function setClientGroup(ClientGroup $clientGroup = null) |
140
|
|
|
{ |
141
|
|
|
$this->clientGroup = $clientGroup; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
public function getTheme() |
145
|
|
|
{ |
146
|
|
|
return $this->theme; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
public function setTheme(Theme $theme = null) |
150
|
|
|
{ |
151
|
|
|
$this->theme = $theme; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
public function getMinimumOrderAmount(): MinimumOrderAmount |
155
|
|
|
{ |
156
|
|
|
return $this->minimumOrderAmount; |
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
public function setMinimumOrderAmount(MinimumOrderAmount $minimumOrderAmount) |
160
|
|
|
{ |
161
|
|
|
$this->minimumOrderAmount = $minimumOrderAmount; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
public function isEnableClient(): bool |
165
|
|
|
{ |
166
|
|
|
return $this->enableClient; |
167
|
|
|
} |
168
|
|
|
|
169
|
|
|
public function setEnableClient(bool $enableClient) |
170
|
|
|
{ |
171
|
|
|
$this->enableClient = $enableClient; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
public function getLogo(): string |
175
|
|
|
{ |
176
|
|
|
return null !== $this->logo ? $this->logo : ''; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
public function setLogo(string $logo = null) |
180
|
|
|
{ |
181
|
|
|
$this->logo = $logo; |
182
|
|
|
} |
183
|
|
|
} |
184
|
|
|
|