mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-04 10:14:13 +08:00
Symfony 6.4 - Update ApiResource Entity classes
- Update imports - replace annotations with attributes
This commit is contained in:
parent
9749583a26
commit
5e2a39c089
17 changed files with 1135 additions and 901 deletions
|
@ -26,38 +26,46 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
namespace App\Themes\Entity;
|
||||
|
||||
|
||||
use ApiPlatform\Core\Annotation\ApiProperty;
|
||||
use ApiPlatform\Core\Annotation\ApiResource;
|
||||
use ApiPlatform\Metadata\ApiProperty;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\Metadata\GraphQl\Query;
|
||||
|
||||
/**
|
||||
* @ApiResource(
|
||||
* itemOperations={
|
||||
* "get"
|
||||
* },
|
||||
* collectionOperations={
|
||||
* },
|
||||
* graphql={
|
||||
* "item_query",
|
||||
* },
|
||||
* )
|
||||
*/
|
||||
#[ApiResource(
|
||||
operations: [
|
||||
new Get()
|
||||
],
|
||||
graphQlOperations: [
|
||||
new Query()
|
||||
]
|
||||
)]
|
||||
class ThemeImages
|
||||
{
|
||||
/**
|
||||
* @ApiProperty(identifier=true)
|
||||
* @var string|null
|
||||
*/
|
||||
protected $id;
|
||||
#[ApiProperty(
|
||||
identifier: true,
|
||||
openapiContext: [
|
||||
'type' => 'string',
|
||||
'description' => 'The id',
|
||||
]
|
||||
)]
|
||||
protected ?string $id;
|
||||
|
||||
/**
|
||||
* @ApiProperty
|
||||
* @var array|null
|
||||
*/
|
||||
protected $items;
|
||||
#[ApiProperty(
|
||||
openapiContext: [
|
||||
'type' => 'array',
|
||||
'description' => 'The items',
|
||||
]
|
||||
)]
|
||||
protected ?array $items;
|
||||
|
||||
/**
|
||||
* Get Id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue