1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
use ApiPlatform\Core\Annotation\ApiResource; |
|
|
|
|
10
|
|
|
use Symfony\Component\Serializer\Annotation\Groups; |
|
|
|
|
11
|
|
|
use ApiPlatform\Core\Annotation\ApiFilter; |
|
|
|
|
12
|
|
|
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; |
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @ORM\EntityListeners({ControleOnline\Listener\LogListener::class}) |
17
|
|
|
* @ApiResource( |
18
|
|
|
* attributes={ |
19
|
|
|
* "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"}}, |
20
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')" |
21
|
|
|
* }, |
22
|
|
|
* normalizationContext ={"groups"={"display:read"}}, |
23
|
|
|
* denormalizationContext={"groups"={"display:write"}}, |
24
|
|
|
* attributes ={"access_control"="is_granted('ROLE_CLIENT')"}, |
25
|
|
|
* collectionOperations ={ |
26
|
|
|
* "get" ={ |
27
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
28
|
|
|
* }, |
29
|
|
|
* "post" ={ |
30
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
31
|
|
|
* }, |
32
|
|
|
* }, |
33
|
|
|
* itemOperations ={ |
34
|
|
|
* "get" ={ |
35
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
36
|
|
|
* }, |
37
|
|
|
* "put" ={ |
38
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
39
|
|
|
* }, |
40
|
|
|
* "delete" ={ |
41
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
42
|
|
|
* }, |
43
|
|
|
* } |
44
|
|
|
* ) |
45
|
|
|
* @ApiFilter( |
46
|
|
|
* SearchFilter::class, properties={ |
47
|
|
|
* "displayQueue.queue.orderProductQueue.status.realStatus": "exact", |
48
|
|
|
* "displayQueue.queue.orderProductQueue.status.status": "exact", |
49
|
|
|
* } |
50
|
|
|
* ) |
51
|
|
|
* @ORM\Table(name="display", indexes={@ORM\Index(name="company_id", columns={"company_id"})}) |
52
|
|
|
* @ORM\Entity |
53
|
|
|
*/ |
54
|
|
|
|
55
|
|
|
class Display |
56
|
|
|
{ |
57
|
|
|
/** |
58
|
|
|
* @var int |
59
|
|
|
* |
60
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false) |
61
|
|
|
* @ORM\Id |
62
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
63
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
64
|
|
|
*/ |
65
|
|
|
private $id; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @var string |
69
|
|
|
* |
70
|
|
|
* @ORM\Column(name="display", type="string", length=50, nullable=false) |
71
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
72
|
|
|
*/ |
73
|
|
|
private $display; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var string |
77
|
|
|
* |
78
|
|
|
* @ORM\Column(name="display_type", type="string", length=0, nullable=false, options={"default"="'display'"}) |
79
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
80
|
|
|
*/ |
81
|
|
|
private $displayType = '\'display\''; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @var \People |
|
|
|
|
85
|
|
|
* |
86
|
|
|
* @ORM\ManyToOne(targetEntity="People") |
87
|
|
|
* @ORM\JoinColumns({ |
88
|
|
|
* @ORM\JoinColumn(name="company_id", referencedColumnName="id") |
89
|
|
|
* }) |
90
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
91
|
|
|
*/ |
92
|
|
|
private $company; |
93
|
|
|
|
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @var \Doctrine\Common\Collections\Collection |
|
|
|
|
97
|
|
|
* |
98
|
|
|
* @ORM\OneToMany(targetEntity="ControleOnline\Entity\DisplayQueue", mappedBy="display") |
99
|
|
|
*/ |
100
|
|
|
private $displayQueue; |
101
|
|
|
|
102
|
|
|
|
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* Get the value of id |
106
|
|
|
*/ |
107
|
|
|
public function getId() |
108
|
|
|
{ |
109
|
|
|
return $this->id; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* Set the value of id |
114
|
|
|
*/ |
115
|
|
|
public function setId($id): self |
116
|
|
|
{ |
117
|
|
|
$this->id = $id; |
118
|
|
|
|
119
|
|
|
return $this; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* Get the value of display |
124
|
|
|
*/ |
125
|
|
|
public function getDisplay() |
126
|
|
|
{ |
127
|
|
|
return $this->display; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Set the value of display |
132
|
|
|
*/ |
133
|
|
|
public function setDisplay($display): self |
134
|
|
|
{ |
135
|
|
|
$this->display = $display; |
136
|
|
|
|
137
|
|
|
return $this; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* Get the value of displayType |
142
|
|
|
*/ |
143
|
|
|
public function getDisplayType() |
144
|
|
|
{ |
145
|
|
|
return $this->displayType; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* Set the value of displayType |
150
|
|
|
*/ |
151
|
|
|
public function setDisplayType($displayType): self |
152
|
|
|
{ |
153
|
|
|
$this->displayType = $displayType; |
154
|
|
|
|
155
|
|
|
return $this; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* Get the value of company |
160
|
|
|
*/ |
161
|
|
|
public function getCompany() |
162
|
|
|
{ |
163
|
|
|
return $this->company; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* Set the value of company |
168
|
|
|
*/ |
169
|
|
|
public function setCompany($company): self |
170
|
|
|
{ |
171
|
|
|
$this->company = $company; |
172
|
|
|
|
173
|
|
|
return $this; |
174
|
|
|
} |
175
|
|
|
|
176
|
|
|
|
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* Add DisplayQueue |
180
|
|
|
* |
181
|
|
|
* @param \ControleOnline\Entity\DisplayQueue $invoice_tax |
182
|
|
|
* @return Order |
183
|
|
|
*/ |
184
|
|
|
public function addADisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue) |
185
|
|
|
{ |
186
|
|
|
$this->displayQueue[] = $displayQueue; |
187
|
|
|
|
188
|
|
|
return $this; |
|
|
|
|
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* Remove DisplayQueue |
193
|
|
|
* |
194
|
|
|
* @param \ControleOnline\Entity\DisplayQueue $invoice_tax |
195
|
|
|
*/ |
196
|
|
|
public function removeDisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue) |
197
|
|
|
{ |
198
|
|
|
$this->displayQueue->removeElement($displayQueue); |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
/** |
202
|
|
|
* Get DisplayQueue |
203
|
|
|
* |
204
|
|
|
* @return \Doctrine\Common\Collections\Collection |
205
|
|
|
*/ |
206
|
|
|
public function getDisplayQueue() |
207
|
|
|
{ |
208
|
|
|
return $this->displayQueue; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
} |
212
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths