|
|
|
@@ -7,7 +7,8 @@ |
|
|
|
|
|
|
|
namespace App\ApiResource; |
|
|
|
|
|
|
|
use ApiPlatform\Doctrine\Odm\Filter\OrderFilter; |
|
|
|
|
|
|
|
use ApiPlatform\Doctrine\Orm\Filter\OrderFilter; |
|
|
|
use ApiPlatform\Doctrine\Orm\State\Options; |
|
|
|
use ApiPlatform\Metadata\ApiFilter; |
|
|
|
use ApiPlatform\Metadata\ApiProperty; |
|
|
|
@@ -41,11 +42,12 @@ use Symfony\Component\Validator\Constraints\NotBlank; |
|
|
|
security: 'is_granted("ROLE_ADMIN")', |
|
|
|
) |
|
|
|
], |
|
|
|
order: ['name' => 'ASC'], |
|
|
|
paginationItemsPerPage: 10, |
|
|
|
security: 'is_granted("ROLE_USER")', |
|
|
|
provider: EntityToDtoStateProvider::class, |
|
|
|
processor: EntityClassDtoStateProcessor::class, |
|
|
|
stateOptions: new Options(entityClass: Partner::class), |
|
|
|
stateOptions: new Options(entityClass: Partner::class) |
|
|
|
)] |
|
|
|
#[ApiFilter(OrderFilter::class, properties: ['name'], arguments: ['orderParameterName' => 'order'])] |
|
|
|
class PartnerApi |
|
|
|
|