feat(constructeur) : add SearchFilter on ConstructeurLink entities
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
||||||
|
use ApiPlatform\Metadata\ApiFilter;
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Delete;
|
use ApiPlatform\Metadata\Delete;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
@@ -32,6 +34,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
]
|
]
|
||||||
)]
|
)]
|
||||||
|
#[ApiFilter(SearchFilter::class, properties: ['composant' => 'exact', 'constructeur' => 'exact'])]
|
||||||
class ComposantConstructeurLink
|
class ComposantConstructeurLink
|
||||||
{
|
{
|
||||||
use CuidEntityTrait;
|
use CuidEntityTrait;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
||||||
|
use ApiPlatform\Metadata\ApiFilter;
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Delete;
|
use ApiPlatform\Metadata\Delete;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
@@ -32,6 +34,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
]
|
]
|
||||||
)]
|
)]
|
||||||
|
#[ApiFilter(SearchFilter::class, properties: ['machine' => 'exact', 'constructeur' => 'exact'])]
|
||||||
class MachineConstructeurLink
|
class MachineConstructeurLink
|
||||||
{
|
{
|
||||||
use CuidEntityTrait;
|
use CuidEntityTrait;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
||||||
|
use ApiPlatform\Metadata\ApiFilter;
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Delete;
|
use ApiPlatform\Metadata\Delete;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
@@ -32,6 +34,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
]
|
]
|
||||||
)]
|
)]
|
||||||
|
#[ApiFilter(SearchFilter::class, properties: ['piece' => 'exact', 'constructeur' => 'exact'])]
|
||||||
class PieceConstructeurLink
|
class PieceConstructeurLink
|
||||||
{
|
{
|
||||||
use CuidEntityTrait;
|
use CuidEntityTrait;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
||||||
|
use ApiPlatform\Metadata\ApiFilter;
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Delete;
|
use ApiPlatform\Metadata\Delete;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
@@ -32,6 +34,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
new Delete(security: "is_granted('ROLE_GESTIONNAIRE')"),
|
||||||
]
|
]
|
||||||
)]
|
)]
|
||||||
|
#[ApiFilter(SearchFilter::class, properties: ['product' => 'exact', 'constructeur' => 'exact'])]
|
||||||
class ProductConstructeurLink
|
class ProductConstructeurLink
|
||||||
{
|
{
|
||||||
use CuidEntityTrait;
|
use CuidEntityTrait;
|
||||||
|
|||||||
Reference in New Issue
Block a user