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({App\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.orderQueue.status.realStatus": "exact", |
48
|
|
|
* "displayQueue.queue.orderQueue.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({"order_read","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({"order_read","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({"order_read","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({"order_read","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
|
|
|
* Get the value of id |
105
|
|
|
*/ |
106
|
|
|
public function getId() |
107
|
|
|
{ |
108
|
|
|
return $this->id; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* Set the value of id |
113
|
|
|
*/ |
114
|
|
|
public function setId($id): self |
115
|
|
|
{ |
116
|
|
|
$this->id = $id; |
117
|
|
|
|
118
|
|
|
return $this; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* Get the value of display |
123
|
|
|
*/ |
124
|
|
|
public function getDisplay() |
125
|
|
|
{ |
126
|
|
|
return $this->display; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* Set the value of display |
131
|
|
|
*/ |
132
|
|
|
public function setDisplay($display): self |
133
|
|
|
{ |
134
|
|
|
$this->display = $display; |
135
|
|
|
|
136
|
|
|
return $this; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Get the value of displayType |
141
|
|
|
*/ |
142
|
|
|
public function getDisplayType() |
143
|
|
|
{ |
144
|
|
|
return $this->displayType; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Set the value of displayType |
149
|
|
|
*/ |
150
|
|
|
public function setDisplayType($displayType): self |
151
|
|
|
{ |
152
|
|
|
$this->displayType = $displayType; |
153
|
|
|
|
154
|
|
|
return $this; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* Get the value of company |
159
|
|
|
*/ |
160
|
|
|
public function getCompany() |
161
|
|
|
{ |
162
|
|
|
return $this->company; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* Set the value of company |
167
|
|
|
*/ |
168
|
|
|
public function setCompany($company): self |
169
|
|
|
{ |
170
|
|
|
$this->company = $company; |
171
|
|
|
|
172
|
|
|
return $this; |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
|
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* Add DisplayQueue |
179
|
|
|
* |
180
|
|
|
* @param \ControleOnline\Entity\DisplayQueue $invoice_tax |
181
|
|
|
* @return Order |
182
|
|
|
*/ |
183
|
|
|
public function addADisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue) |
184
|
|
|
{ |
185
|
|
|
$this->displayQueue[] = $displayQueue; |
186
|
|
|
|
187
|
|
|
return $this; |
|
|
|
|
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* Remove DisplayQueue |
192
|
|
|
* |
193
|
|
|
* @param \ControleOnline\Entity\DisplayQueue $invoice_tax |
194
|
|
|
*/ |
195
|
|
|
public function removeDisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue) |
196
|
|
|
{ |
197
|
|
|
$this->displayQueue->removeElement($displayQueue); |
198
|
|
|
} |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* Get DisplayQueue |
202
|
|
|
* |
203
|
|
|
* @return \Doctrine\Common\Collections\Collection |
204
|
|
|
*/ |
205
|
|
|
public function getDisplayQueue() |
206
|
|
|
{ |
207
|
|
|
return $this->displayQueue; |
208
|
|
|
} |
209
|
|
|
} |
210
|
|
|
|
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