ControleOnline /
api-platform-queue
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ControleOnline\Entity; |
||
| 4 | |||
| 5 | use Symfony\Component\Serializer\Attribute\Groups; |
||
|
0 ignored issues
–
show
|
|||
| 6 | |||
| 7 | use ApiPlatform\Metadata\ApiResource; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\ApiResource was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 8 | use ApiPlatform\Metadata\ApiFilter; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\ApiFilter was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 9 | use ApiPlatform\Metadata\Get; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\Get was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 10 | use ApiPlatform\Metadata\GetCollection; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\GetCollection was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 11 | use ApiPlatform\Metadata\Post; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\Post was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 12 | use ApiPlatform\Metadata\Put; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\Put was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 13 | use ApiPlatform\Metadata\Delete; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\Delete was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 14 | use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Doctrine\Orm\Filter\SearchFilter was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 15 | use Doctrine\ORM\Mapping as ORM; |
||
|
0 ignored issues
–
show
The type
Doctrine\ORM\Mapping was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 16 | use Doctrine\Common\Collections\Collection; |
||
|
0 ignored issues
–
show
The type
Doctrine\Common\Collections\Collection was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 17 | use ControleOnline\Entity\People; |
||
|
0 ignored issues
–
show
The type
ControleOnline\Entity\People was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 18 | use ControleOnline\Entity\DisplayQueue; |
||
| 19 | use ControleOnline\Listener\LogListener; |
||
|
0 ignored issues
–
show
The type
ControleOnline\Listener\LogListener was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 20 | |||
| 21 | #[ORM\Table(name: 'display')] |
||
| 22 | #[ORM\Index(name: 'company_id', columns: ['company_id'])] |
||
| 23 | #[ORM\EntityListeners([LogListener::class])] |
||
| 24 | #[ORM\Entity] |
||
| 25 | #[ApiResource( |
||
| 26 | formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => 'text/csv'], |
||
| 27 | normalizationContext: ['groups' => ['display:read']], |
||
| 28 | denormalizationContext: ['groups' => ['display:write']], |
||
| 29 | security: "is_granted('ROLE_CLIENT')", |
||
| 30 | operations: [ |
||
| 31 | new GetCollection(security: "is_granted('ROLE_CLIENT')"), |
||
| 32 | new Post(security: "is_granted('ROLE_CLIENT')"), |
||
| 33 | new Get(security: "is_granted('ROLE_CLIENT')"), |
||
| 34 | new Put(security: "is_granted('ROLE_CLIENT')"), |
||
| 35 | new Delete(security: "is_granted('ROLE_CLIENT')") |
||
| 36 | ] |
||
| 37 | )] |
||
| 38 | #[ApiFilter(SearchFilter::class, properties: [ |
||
| 39 | 'displayQueue.queue.orderProductQueue.status.realStatus' => 'exact', |
||
| 40 | 'displayQueue.queue.orderProductQueue.status.status' => 'exact' |
||
| 41 | ])] |
||
| 42 | class Display |
||
| 43 | { |
||
| 44 | #[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
||
| 45 | #[ORM\Id] |
||
| 46 | #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
||
| 47 | #[Groups(['display_queue:read', 'order:read', 'order_details:read', 'order:write', 'display:read', 'display:write'])] |
||
| 48 | private $id; |
||
| 49 | |||
| 50 | #[ORM\Column(name: 'display', type: 'string', length: 50, nullable: false)] |
||
| 51 | #[Groups(['display_queue:read', 'order:read', 'order_details:read', 'order:write', 'display:read', 'display:write'])] |
||
| 52 | private $display; |
||
| 53 | |||
| 54 | #[ORM\Column(name: 'display_type', type: 'string', length: 0, nullable: false, options: ['default' => "'display'"])] |
||
| 55 | #[Groups(['display_queue:read', 'order:read', 'order_details:read', 'order:write', 'display:read', 'display:write'])] |
||
| 56 | private $displayType = '\'display\''; |
||
| 57 | |||
| 58 | #[ORM\ManyToOne(targetEntity: People::class)] |
||
| 59 | #[ORM\JoinColumn(name: 'company_id', referencedColumnName: 'id')] |
||
| 60 | #[Groups(['display_queue:read', 'order:read', 'order_details:read', 'order:write', 'display:read', 'display:write'])] |
||
| 61 | private $company; |
||
| 62 | |||
| 63 | #[ORM\OneToMany(targetEntity: DisplayQueue::class, mappedBy: 'display')] |
||
| 64 | private $displayQueue; |
||
| 65 | |||
| 66 | public function getId() |
||
| 67 | { |
||
| 68 | return $this->id; |
||
| 69 | } |
||
| 70 | |||
| 71 | public function setId($id): self |
||
| 72 | { |
||
| 73 | $this->id = $id; |
||
| 74 | return $this; |
||
| 75 | } |
||
| 76 | |||
| 77 | public function getDisplay() |
||
| 78 | { |
||
| 79 | return $this->display; |
||
| 80 | } |
||
| 81 | |||
| 82 | public function setDisplay($display): self |
||
| 83 | { |
||
| 84 | $this->display = $display; |
||
| 85 | return $this; |
||
| 86 | } |
||
| 87 | |||
| 88 | public function getDisplayType() |
||
| 89 | { |
||
| 90 | return $this->displayType; |
||
| 91 | } |
||
| 92 | |||
| 93 | public function setDisplayType($displayType): self |
||
| 94 | { |
||
| 95 | $this->displayType = $displayType; |
||
| 96 | return $this; |
||
| 97 | } |
||
| 98 | |||
| 99 | public function getCompany() |
||
| 100 | { |
||
| 101 | return $this->company; |
||
| 102 | } |
||
| 103 | |||
| 104 | public function setCompany($company): self |
||
| 105 | { |
||
| 106 | $this->company = $company; |
||
| 107 | return $this; |
||
| 108 | } |
||
| 109 | |||
| 110 | public function addADisplayQueue(DisplayQueue $displayQueue) |
||
| 111 | { |
||
| 112 | $this->displayQueue[] = $displayQueue; |
||
| 113 | return $this; |
||
| 114 | } |
||
| 115 | |||
| 116 | public function removeDisplayQueue(DisplayQueue $displayQueue) |
||
| 117 | { |
||
| 118 | $this->displayQueue->removeElement($displayQueue); |
||
| 119 | } |
||
| 120 | |||
| 121 | public function getDisplayQueue() |
||
| 122 | { |
||
| 123 | return $this->displayQueue; |
||
| 124 | } |
||
| 125 | } |
||
| 126 |
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