Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
php:symfony:операции_operations [2024/04/15 00:00] mirocowphp:symfony:операции_operations [2024/04/15 21:07] (текущий) – [Операции / Operations] mirocow
Строка 24: Строка 24:
  
 <code php> <code php>
-#[ApiResource(operations:+#[ApiResource( 
-    new Get(), +    shortName: 'User', 
-    new Put(), +    description: 'Utilisateurs', 
-    new Patch(), +    operations: [ 
-    new Delete(), +        new Get(), 
-    new GetCollection(), +        new GetCollection(), 
-    new Post(), +        new Post(), 
-])]+        new Put(), 
 +        new Patch(), 
 +        new Delete(), 
 +    ]
 +    normalizationContext:
 +        'groups' => ['user:read'], 
 +    ], 
 +    denormalizationContext:
 +        'groups' => ['user:write'], 
 +    ], 
 +    security: "is_granted('ROLE_USER')" 
 +)]
 </code> </code>
      
Строка 52: Строка 63:
 | iri:          | 'https://schema.org/Book'    | types: ['https://schema.org/Book']| | iri:          | 'https://schema.org/Book'    | types: ['https://schema.org/Book']|
 | type:         | 'string'                     | builtinTypes: ['string']| | type:         | 'string'                     | builtinTypes: ['string']|
-  + 
 +====== Symfony / API Platform ====== 
 {{topic>[symfony]}} {{topic>[symfony]}}